summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/rangehttpserver
diff options
context:
space:
mode:
authorAdam Joseph <adam@westernsemico.com>2023-06-10 13:00:00 -0700
committerAdam Joseph <adam@westernsemico.com>2023-07-05 09:17:56 -0700
commit7eaaa6ef228f22f681d3ee298bb7cd055486397c (patch)
tree6784ffdcb766f496f6f0ddcbddcb8a9ec5cf299a /pkgs/development/python-modules/rangehttpserver
parentfa9859507ba72b72f157b42da4ef0cc89a082074 (diff)
openssl: prevent -march= flags from being added on mips
Openssl assumes that CFLAGS contains all of the flags that will be passed to the compiler. This assumption fails for nixpkgs due to our cc-wrapper. On mips platforms, openssl scans CFLAGS to see if the user passed a -march flag; if not, it adds its own: if ($target =~ /linux.*-mips/ && !$disabled{asm} && !grep { $_ =~ /-m(ips|arch=)/ } (@{$config{CFLAGS}})) { # minimally required architecture flags for assembly modules my $value; $value = '-mips2' if ($target =~ /mips32/); $value = '-mips3' if ($target =~ /mips64/); unshift @{$config{cflags}}, $value; unshift @{$config{cxxflags}}, $value if $config{CXX}; } Unfortunately since nixpkgs adds `-march=` in the wrapper, rather than the CFLAGS, openssl can't see it. The result is two conflicting `-march=` flags and a build failure when the user has customized `hostPlatform.gcc.arch`: openssl-mips64el-unknown-linux-gnuabin32> mips64el-unknown-linux-gnuabin32-gcc -I. -Iinclude -Iapps/include -fPIC -pthread -mabi=n32 -mips3 -Wa,--noexecstack -Wall -O3 -DOPENSSL_USE_NODELETE -DOPENSSL_PIC -DOPENSSLDIR="\"/nix/store/8kwvrgwdk56ml6sz5swr71fv9mv4592w-openssl-mips64el-unknown-linux-gnuabin32-3.0.9/etc/ssl\"" -DENGINESDIR="\"/nix/store/8kwvrgwdk56ml6sz5swr71fv9mv4592w-openssl-mips64el-unknown-linux-gnuabin32-3.0.9/lib/engines-3\"" -DMODULESDIR="\"/nix/store/8kwvrgwdk56ml6sz5swr71fv9mv4592w-openssl-mips64el-unknown-linux-gnuabin32-3.0.9/lib/ossl-modules\"" -DOPENSSL_BUILDING_OPENSSL -DNDEBUG -MMD -MF apps/lib/libapps-lib-engine.d.tmp -MT apps/lib/libapps-lib-engine.o -c -o apps/lib/libapps-lib-engine.o apps/lib/engine.c cc1: error: '-mips3' conflicts with the other architecture options, which specify a mips64r2 processor cc1: error: '-mips3' conflicts with the other architecture options, which specify a mips64r2 processor make[1]: *** [Makefile:4254: apps/lib/libapps-lib-app_libctx.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: *** [Makefile:4262: apps/lib/libapps-lib-app_params.o] Error 1 make[1]: *** [Makefile:4270: apps/lib/libapps-lib-app_provider.o] Error 1 This commit defeats the perl code above by passing `CFLAGS=-march` to openssl's `./Configure` script.
Diffstat (limited to 'pkgs/development/python-modules/rangehttpserver')
0 files changed, 0 insertions, 0 deletions