emerging postgresql-server:9.2 with the hardened x86_64-pc-linux-gnu-4.6.3 fails x86_64-pc-linux-gnu-gcc -O2 -pipe -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -I../../../src/include pg_resetxlog.o -L../../../src/port -Wl,-O1 -Wl,--as-needed -L/usr/lib64/postgresql-9.2/lib64 -Wl,--as-needed -Wl,-rpath,'/usr/lib64/postgresql-9.2/lib64',--enable-new-dtags -Wl,-O1 -Wl,--as-needed -lpgport -lpam -lssl -lcrypto -lz -lreadline -lcrypt -ldl -lm -o pg_resetxlog /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/postgresql-9.2/lib64/libpgport.a(exec.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /usr/lib64/postgresql-9.2/lib64/libpgport.a: could not read symbols: Bad value Reproducible: Always Steps to Reproduce: 1.emerge postgresql-server with hardened toolchain including PIE Actual Results: Fails with error
Created attachment 355016 [details] build.log
Created attachment 355018 [details] environment
Created attachment 355020 [details] emerge --info
emerge --unemerge postgresql-base resolved this problem it seems like this was caught in a loop using pg_config CFLAGS/LDFLAGS which prevented postgresql-base/postgresql-server from being built with PIC/PIE