Compare commits

...

2 commits

Author SHA1 Message Date
Jake Hamilton 6d0463d37d
fix: working gcc build 2024-08-22 16:25:33 -07:00
Jake Hamilton 4b36a5a013
wip 2024-08-20 14:52:31 -07:00
2 changed files with 17 additions and 22 deletions

View file

@ -8,10 +8,11 @@
},
"locked": {
"dir": "foundation",
"dirtyRev": "cadfaabc853d20f2bc20bad794fcbe520ea48f13-dirty",
"dirtyShortRev": "cadfaab-dirty",
"lastModified": 1723737980,
"narHash": "sha256-wytg4odrfvFVYvTskWUficyi8VnaaEt54aIlKUn3SKw=",
"lastModified": 1724190751,
"narHash": "sha256-e8sOmeXS9YWuQqjW6gvtS3PIueazkf4S1iiJ/94eXv4=",
"ref": "master",
"rev": "4b36a5a0133f5481840bdfaf693c971215a7ef1f",
"revCount": 84,
"type": "git",
"url": "file:../"
},
@ -24,10 +25,11 @@
"lib": {
"locked": {
"dir": "lib",
"dirtyRev": "cadfaabc853d20f2bc20bad794fcbe520ea48f13-dirty",
"dirtyShortRev": "cadfaab-dirty",
"lastModified": 1723737980,
"narHash": "sha256-wytg4odrfvFVYvTskWUficyi8VnaaEt54aIlKUn3SKw=",
"lastModified": 1724190751,
"narHash": "sha256-e8sOmeXS9YWuQqjW6gvtS3PIueazkf4S1iiJ/94eXv4=",
"ref": "master",
"rev": "4b36a5a0133f5481840bdfaf693c971215a7ef1f",
"revCount": 84,
"type": "git",
"url": "file:../"
},

View file

@ -203,30 +203,23 @@ in
patch = ''
# Patch
# force musl even if host triple is gnu
# sed -i 's|"os/gnu-linux"|"os/generic"|' libstdc++-v3/configure.host
sed -i 's|"os/gnu-linux"|"os/generic"|' libstdc++-v3/configure.host
'';
configure = ''
# Configure
# export CC="gcc -Wl,-dynamic-linker -Wl,${foundation.stage1-musl}/lib/libc.so"
# export CXX="g++ -Wl,-dynamic-linker -Wl,${foundation.stage1-musl}/lib/libc.so"
# export CFLAGS_FOR_TARGET="-Wl,-dynamic-linker -Wl,${foundation.stage1-musl}/lib/libc.so"
export CC="gcc -Wl,-dynamic-linker"
export CXX="g++ -Wl,-dynamic-linker"
export CFLAGS_FOR_TARGET="-Wl,-dynamic-linker"
# export LIBRARY_PATH="${foundation.stage1-musl}/lib"
export LIBRARY_PATH="$AUX_COMPILER_LIBRARY_PATH"
export CC="gcc -Wl,-dynamic-linker -Wl,${foundation.stage1-musl}/lib/libc.so"
export CXX="g++ -Wl,-dynamic-linker -Wl,${foundation.stage1-musl}/lib/libc.so"
export CFLAGS_FOR_TARGET="-Wl,-dynamic-linker -Wl,${foundation.stage1-musl}/lib/libc.so"
export LIBRARY_PATH="${foundation.stage1-musl}/lib"
: ''${LD_LIBRARY_PATH:=}
export LD_LIBRARY_PATH="$NIX_BUILD_TOP/gmp/lib:$NIX_BUILD_TOP/mpfr/lib:$NIX_BUILD_TOP/mpc/lib:$NIX_BUILD_TOP/isl/lib:$LD_LIBRARY_PATH"
# --with-sysroot=${foundation.stage1-musl} \
# --with-native-system-header-dir=/include \
bash ./configure \
--prefix=$out \
--build=${config.platform.build.triple} \
--host=${config.platform.host.triple} \
--target=${config.platform.target.triple} \
--with-sysroot=${foundation.stage1-musl} \
--with-native-system-header-dir=/include \
--enable-languages=c,c++ \
--disable-bootstrap \
--disable-libsanitizer \