[COMMITTED] Replace --enable-static-pie with --disable-default-pie

Florian Weimer fweimer@redhat.com
Thu Dec 16 19:26:48 GMT 2021


We recently started building libc.a with -DPIC on arm:

gcc ../sysdeps/unix/sysv/linux/arm/setcontext.S -c     -I../include -I/builddir/build/BUILD/glibc-2.34.9000-376-g4435c29892/build-armv7hl-redhat-linuxeabi/stdlib  -I/builddir/build/BUILD/glibc-2.34.9000-376-g4435c29892/build-armv7hl-redhat-linuxeabi  -I../sysdeps/unix/sysv/linux/arm/le  -I../sysdeps/unix/sysv/linux/arm  -I../sysdeps/arm/nptl  -I../sysdeps/unix/sysv/linux/include -I../sysdeps/unix/sysv/linux  -I../sysdeps/nptl  -I../sysdeps/pthread  -I../sysdeps/gnu  -I../sysdeps/unix/inet  -I../sysdeps/unix/sysv  -I../sysdeps/unix/arm  -I../sysdeps/unix  -I../sysdeps/posix  -I../sysdeps/arm/le/armv7/multiarch  -I../sysdeps/arm/armv7/multiarch  -I../sysdeps/arm/le/armv7  -I../sysdeps/arm/armv7  -I../sysdeps/arm/armv6t2  -I../sysdeps/arm/armv6  -I../sysdeps/arm/le  -I../sysdeps/arm/include -I../sysdeps/arm  -I../sysdeps/wordsize-32  -I../sysdeps/ieee754/flt-32  -I../sysdeps/ieee754/dbl-64  -I../sysdeps/ieee754  -I../sysdeps/generic  -I.. -I../libio -I. -nostdinc -isystem /usr/lib/gcc/armv7hl-redhat-linux-gnueabi/11/include -isystem /usr/include -D_LIBC_REENTRANT -include /builddir/build/BUILD/glibc-2.34.9000-376-g4435c29892/build-armv7hl-redhat-linuxeabi/libc-modules.h -DMODULE_NAME=libc -include ../include/libc-symbols.h  -DPIC     -DTOP_NAMESPACE=glibc -DASSEMBLER  -g -Wa,--generate-missing-build-notes=yes -Werror=undef -Wa,--noexecstack   -o /builddir/build/BUILD/glibc-2.34.9000-376-g4435c29892/build-armv7hl-redhat-linuxeabi/stdlib/setcontext.o -MD -MP -MF /builddir/build/BUILD/glibc-2.34.9000-376-g4435c29892/build-armv7hl-redhat-linuxeabi/stdlib/setcontext.o.dt -MT /builddir/build/BUILD/glibc-2.34.9000-376-g4435c29892/build-armv7hl-redhat-linuxeabi/stdlib/setcontext.o

Before, we had this (no -DPIC between “../include/libc-symbols.h” and
“-DTOP_NAMESPACE=glibc“):

gcc ../sysdeps/unix/sysv/linux/arm/setcontext.S -c     -I../include -I/builddir/build/BUILD/glibc-2.34.9000-326-g4df1fa6ddc/build-armv7hl-redhat-linuxeabi/stdlib  -I/builddir/build/BUILD/glibc-2.34.9000-326-g4df1fa6ddc/build-armv7hl-redhat-linuxeabi  -I../sysdeps/unix/sysv/linux/arm/le  -I../sysdeps/unix/sysv/linux/arm  -I../sysdeps/arm/nptl  -I../sysdeps/unix/sysv/linux/include -I../sysdeps/unix/sysv/linux  -I../sysdeps/nptl  -I../sysdeps/pthread  -I../sysdeps/gnu  -I../sysdeps/unix/inet  -I../sysdeps/unix/sysv  -I../sysdeps/unix/arm  -I../sysdeps/unix  -I../sysdeps/posix  -I../sysdeps/arm/le/armv7/multiarch  -I../sysdeps/arm/armv7/multiarch  -I../sysdeps/arm/le/armv7  -I../sysdeps/arm/armv7  -I../sysdeps/arm/armv6t2  -I../sysdeps/arm/armv6  -I../sysdeps/arm/le  -I../sysdeps/arm/include -I../sysdeps/arm  -I../sysdeps/wordsize-32  -I../sysdeps/ieee754/flt-32  -I../sysdeps/ieee754/dbl-64  -I../sysdeps/ieee754  -I../sysdeps/generic  -I.. -I../libio -I. -nostdinc -isystem /usr/lib/gcc/armv7hl-redhat-linux-gnueabi/11/include -isystem /usr/include -D_LIBC_REENTRANT -include /builddir/build/BUILD/glibc-2.34.9000-326-g4df1fa6ddc/build-armv7hl-redhat-linuxeabi/libc-modules.h -DMODULE_NAME=libc -include ../include/libc-symbols.h       -DTOP_NAMESPACE=glibc -DASSEMBLER  -g -Wa,--generate-missing-build-notes=yes -Werror=undef -Wa,--noexecstack   -o /builddir/build/BUILD/glibc-2.34.9000-326-g4df1fa6ddc/build-armv7hl-redhat-linuxeabi/stdlib/setcontext.o -MD -MP -MF /builddir/build/BUILD/glibc-2.34.9000-326-g4df1fa6ddc/build-armv7hl-redhat-linuxeabi/stdlib/setcontext.o.dt -MT /builddir/build/BUILD/glibc-2.34.9000-326-g4df1fa6ddc/build-armv7hl-redhat-linuxeabi/stdlib/setcontext.o

I'm going to send a patch, but I can't really test it.

Thanks,
Florian



More information about the Libc-alpha mailing list