Created attachment 313527 [details] dev-libs/openssl-1.0.1c failure build.log The ebuild for dev-libs/openssl explicitly does `append-flags $(test-flags-CC -Wa,--noexecstack)`, which causes a build failure when the patch from bug #417795 is applied. Without that patch, a failure occurs before clang is invoked. It would be useful to silently ignore this flag until support for stack smashing protection is implemented in Clang.
Actually, this failure was caused by the use of -Wall, which is a separate issue.
I was wrong to think that -Wall was causing this. It happens regardless of whether or not -Wall is present. :/
you should probably provide the exact command line and the output of clang -v it works fine here: $ cat foo.c #include <stdio.h> int main() { printf("hello\n"); } $ clang -Wa,--noexecstack foo.c $ ./a.out hello
I can reproduce this on my system by running the following (with the patch from bug #417795 applied by epatch_user): `env CC=clang emerge -1v openssl && (cd /var/tmp/portage/dev-libs/openssl-1.0.1c/work/openssl-1.0.1c/crypto &&../util/domd .. -MD clang -- -fPIC -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -pthread -D_THREAD_SAFE -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN -DTERMIOS -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM -O2 -pipe -march=amdfam10 -mtune=amdfam10 -fno-strict-aliasing -Wa,--noexecstack -I. -I.. -I../include -DOPENSSL_NO_DEPRECATED -DOPENSSL_NO_EC_NISTP_64_GCC_128 -DOPENSSL_NO_GMP -DOPENSSL_NO_JPAKE -DOPENSSL_NO_MD2 -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_SCTP -DOPENSSL_NO_STORE -- cryptlib.c mem.c mem_clr.c mem_dbg.c cversion.c ex_data.c cpt_err.c ebcdic.c uid.c o_time.c o_str.c o_dir.c o_fips.c o_init.c fips_ers.c)` I have had trouble isolating the exact command that is being invoked with truss, so I do not know what that is at the moment.
Is this still an issue? openssl-1.0.2f builds fine since the bug #417795 was fixed
Mass-closing of bugs pinned to old clang versions. Please reopen and update summary appropriately if the bug still applies to a newer version (and hasn't been reported separately for it).