* [Bug dynamic-link/29835] Error compiling glibc multilib with --enable-static-pie option turned on
2022-11-29 12:00 [Bug build/29835] New: Error compiling glibc multilib with --enable-static-pie option turned on linzhuorong at huawei dot com
@ 2022-11-29 12:23 ` linzhuorong at huawei dot com
2022-11-29 12:24 ` linzhuorong at huawei dot com
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: linzhuorong at huawei dot com @ 2022-11-29 12:23 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=29835
lin zhuorong <linzhuorong at huawei dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|build |dynamic-link
--- Comment #1 from lin zhuorong <linzhuorong at huawei dot com> ---
I think Static executables do not have symbol _DYNAMIC
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug dynamic-link/29835] Error compiling glibc multilib with --enable-static-pie option turned on
2022-11-29 12:00 [Bug build/29835] New: Error compiling glibc multilib with --enable-static-pie option turned on linzhuorong at huawei dot com
2022-11-29 12:23 ` [Bug dynamic-link/29835] " linzhuorong at huawei dot com
@ 2022-11-29 12:24 ` linzhuorong at huawei dot com
2022-11-29 12:54 ` schwab@linux-m68k.org
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: linzhuorong at huawei dot com @ 2022-11-29 12:24 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=29835
lin zhuorong <linzhuorong at huawei dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Version|2.37 |2.38
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug dynamic-link/29835] Error compiling glibc multilib with --enable-static-pie option turned on
2022-11-29 12:00 [Bug build/29835] New: Error compiling glibc multilib with --enable-static-pie option turned on linzhuorong at huawei dot com
2022-11-29 12:23 ` [Bug dynamic-link/29835] " linzhuorong at huawei dot com
2022-11-29 12:24 ` linzhuorong at huawei dot com
@ 2022-11-29 12:54 ` schwab@linux-m68k.org
2022-12-02 9:52 ` schwab@linux-m68k.org
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: schwab@linux-m68k.org @ 2022-11-29 12:54 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=29835
Andreas Schwab <schwab@linux-m68k.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |maskray at google dot com
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug dynamic-link/29835] Error compiling glibc multilib with --enable-static-pie option turned on
2022-11-29 12:00 [Bug build/29835] New: Error compiling glibc multilib with --enable-static-pie option turned on linzhuorong at huawei dot com
` (2 preceding siblings ...)
2022-11-29 12:54 ` schwab@linux-m68k.org
@ 2022-12-02 9:52 ` schwab@linux-m68k.org
2022-12-02 22:02 ` i at maskray dot me
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: schwab@linux-m68k.org @ 2022-12-02 9:52 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=29835
--- Comment #2 from Andreas Schwab <schwab@linux-m68k.org> ---
*** Bug 29840 has been marked as a duplicate of this bug. ***
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug dynamic-link/29835] Error compiling glibc multilib with --enable-static-pie option turned on
2022-11-29 12:00 [Bug build/29835] New: Error compiling glibc multilib with --enable-static-pie option turned on linzhuorong at huawei dot com
` (3 preceding siblings ...)
2022-12-02 9:52 ` schwab@linux-m68k.org
@ 2022-12-02 22:02 ` i at maskray dot me
2022-12-05 1:50 ` linzhuorong at huawei dot com
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: i at maskray dot me @ 2022-12-02 22:02 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=29835
Fangrui Song <i at maskray dot me> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |i at maskray dot me
--- Comment #3 from Fangrui Song <i at maskray dot me> ---
How do you configure your build?
mkdir -p out/arm && cd out/arm
../../configure --prefix=/tmp/glibc/arm --host=arm-linux-gnueabihf
--enable-static-pie --enable-hardcoded-path-in-tests
make -j 60 # good
% grep pie_supported config.log
libc_cv_pie_supported=yes
libc_cv_static_pie_supported=no
Note that sysdeps/arm/configure.ac doesn't say `AC_DEFINE(SUPPORT_STATIC_PIE)`,
so I think static-pie for sysdeps/arm is unsupported.
% cat a.c
const char *foo (void)
{
extern const char _DYNAMIC[] __attribute__((visibility("hidden")));
return _DYNAMIC;
}
% arm-linux-gnueabihf-gcc -fpic -nostdlib -static-pie a.c
# good. Both -shared and -pie have .dynamic and define _DYNAMIC
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug dynamic-link/29835] Error compiling glibc multilib with --enable-static-pie option turned on
2022-11-29 12:00 [Bug build/29835] New: Error compiling glibc multilib with --enable-static-pie option turned on linzhuorong at huawei dot com
` (4 preceding siblings ...)
2022-12-02 22:02 ` i at maskray dot me
@ 2022-12-05 1:50 ` linzhuorong at huawei dot com
2022-12-06 10:56 ` schwab@linux-m68k.org
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: linzhuorong at huawei dot com @ 2022-12-05 1:50 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=29835
--- Comment #4 from lin zhuorong <linzhuorong at huawei dot com> ---
configure:
CC="$PREFIX/bin/$TARGET-gcc $CFLAGS_FOR_TARGET -Wno-error=maybe-uninitialized
-mcpu=cortex-a53 -mfloat-abi=hard -mfpu=neon-vfpv4 -D SUPPORT_STATIC_PIE"
LDFLAGS="${SECURE_LDFLAGS}" CXX="$PREFIX/bin/$TARGET-g++ $CFLAGS_FOR_TARGET
-Wno-error=maybe-uninitialized -mcpu=cortex-a53 -mfloat-abi=hard
-mfpu=neon-vfpv4" $ROOT_TAR_SRC/$GLIBC/configure --prefix=/usr
--with-headers=$SYSROOT/usr/include/ --build=$BUILD --host=$TARGET
--enable-profile --without-gd --without-cvs --disable-multi-arch
--enable-obsolete-rpc --enable-add-ons --enable-stack-protector=strong
libc_cv_ssp=yes --enable-static-pie
make -j $PARALLEL
make install_root=$SYSROOT install
I want to get statically linked sln
It is work in the gcc 7.3.0 version, but build error in the gcc 10.3.0
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug dynamic-link/29835] Error compiling glibc multilib with --enable-static-pie option turned on
2022-11-29 12:00 [Bug build/29835] New: Error compiling glibc multilib with --enable-static-pie option turned on linzhuorong at huawei dot com
` (5 preceding siblings ...)
2022-12-05 1:50 ` linzhuorong at huawei dot com
@ 2022-12-06 10:56 ` schwab@linux-m68k.org
2022-12-06 12:14 ` linzhuorong at huawei dot com
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: schwab@linux-m68k.org @ 2022-12-06 10:56 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=29835
Andreas Schwab <schwab@linux-m68k.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |INVALID
--- Comment #5 from Andreas Schwab <schwab@linux-m68k.org> ---
You cannot just define SUPPORT_STATIC_PIE when in fact support for static pie
is not existing.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug dynamic-link/29835] Error compiling glibc multilib with --enable-static-pie option turned on
2022-11-29 12:00 [Bug build/29835] New: Error compiling glibc multilib with --enable-static-pie option turned on linzhuorong at huawei dot com
` (6 preceding siblings ...)
2022-12-06 10:56 ` schwab@linux-m68k.org
@ 2022-12-06 12:14 ` linzhuorong at huawei dot com
2022-12-06 12:38 ` schwab@linux-m68k.org
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: linzhuorong at huawei dot com @ 2022-12-06 12:14 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=29835
--- Comment #6 from lin zhuorong <linzhuorong at huawei dot com> ---
Why it works in 7.3.0, but compiles error in 10.3.0?
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug dynamic-link/29835] Error compiling glibc multilib with --enable-static-pie option turned on
2022-11-29 12:00 [Bug build/29835] New: Error compiling glibc multilib with --enable-static-pie option turned on linzhuorong at huawei dot com
` (7 preceding siblings ...)
2022-12-06 12:14 ` linzhuorong at huawei dot com
@ 2022-12-06 12:38 ` schwab@linux-m68k.org
2022-12-07 12:50 ` linzhuorong at huawei dot com
2022-12-18 0:33 ` i at maskray dot me
10 siblings, 0 replies; 12+ messages in thread
From: schwab@linux-m68k.org @ 2022-12-06 12:38 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=29835
--- Comment #7 from Andreas Schwab <schwab@linux-m68k.org> ---
Because gcc 7 does not know anything about static-pie.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug dynamic-link/29835] Error compiling glibc multilib with --enable-static-pie option turned on
2022-11-29 12:00 [Bug build/29835] New: Error compiling glibc multilib with --enable-static-pie option turned on linzhuorong at huawei dot com
` (8 preceding siblings ...)
2022-12-06 12:38 ` schwab@linux-m68k.org
@ 2022-12-07 12:50 ` linzhuorong at huawei dot com
2022-12-18 0:33 ` i at maskray dot me
10 siblings, 0 replies; 12+ messages in thread
From: linzhuorong at huawei dot com @ 2022-12-07 12:50 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=29835
lin zhuorong <linzhuorong at huawei dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|INVALID |---
--- Comment #8 from lin zhuorong <linzhuorong at huawei dot com> ---
(In reply to Fangrui Song from comment #3)
> How do you configure your build?
>
>
> mkdir -p out/arm && cd out/arm
> ../../configure --prefix=/tmp/glibc/arm --host=arm-linux-gnueabihf
> --enable-static-pie --enable-hardcoded-path-in-tests
> make -j 60 # good
>
> % grep pie_supported config.log
> libc_cv_pie_supported=yes
> libc_cv_static_pie_supported=no
>
> Note that sysdeps/arm/configure.ac doesn't say
> `AC_DEFINE(SUPPORT_STATIC_PIE)`, so I think static-pie for sysdeps/arm is
> unsupported.
>
>
> % cat a.c
> const char *foo (void)
> {
> extern const char _DYNAMIC[] __attribute__((visibility("hidden")));
> return _DYNAMIC;
> }
> % arm-linux-gnueabihf-gcc -fpic -nostdlib -static-pie a.c
> # good. Both -shared and -pie have .dynamic and define _DYNAMIC
What version of gcc are you using?
I used gcc 10.3.0 to compile the above a.c and also got the error undefined
reference to '_DYNAMIC'
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug dynamic-link/29835] Error compiling glibc multilib with --enable-static-pie option turned on
2022-11-29 12:00 [Bug build/29835] New: Error compiling glibc multilib with --enable-static-pie option turned on linzhuorong at huawei dot com
` (9 preceding siblings ...)
2022-12-07 12:50 ` linzhuorong at huawei dot com
@ 2022-12-18 0:33 ` i at maskray dot me
10 siblings, 0 replies; 12+ messages in thread
From: i at maskray dot me @ 2022-12-18 0:33 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=29835
Fangrui Song <i at maskray dot me> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |INVALID
Status|UNCONFIRMED |RESOLVED
--- Comment #9 from Fangrui Song <i at maskray dot me> ---
sysdeps/arm/configure.ac doesn't say `AC_DEFINE(SUPPORT_STATIC_PIE)`, so
static-pie isn't supported by the port yet. It's not correct to supply -D
SUPPORT_STATIC_PIE and pretend that it is working.
The reason could be in glibc or in binutils ld.bfd (i.e. the linker may need
some patches to properly support static pie). Then the glibc build system may
need to detect whether the linker is capable of static pie.
GCC not supporting static-pie has such an error:
error: unrecognized option '-static-pie'
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread