summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--etc/repos.json10
-rw-r--r--src/bootstrap/stage-0-busybox.TARGETS3
-rw-r--r--src/bootstrap/stage-0-gcc.TARGETS3
-rw-r--r--src/bootstrap/stage-1-gcc.TARGETS3
-rw-r--r--src/compilers/clang-16-native.TARGETS16
-rw-r--r--src/compilers/clang-17-native.TARGETS16
-rw-r--r--src/compilers/gcc-13-musl-static.TARGETS9
-rw-r--r--src/compilers/gcc-13-musl.TARGETS13
-rw-r--r--src/compilers/gcc-13-native.TARGETS11
-rw-r--r--src/tools/busybox-1.36.TARGETS3
10 files changed, 54 insertions, 33 deletions
diff --git a/etc/repos.json b/etc/repos.json
index 8704fa9..36be465 100644
--- a/etc/repos.json
+++ b/etc/repos.json
@@ -10,11 +10,11 @@
, "toolchains": {"repository": {"type": "file", "path": "toolchains"}}
, "rules":
{ "repository":
- { "type": "git"
- , "branch": "master"
- , "commit": "90185a3c608f1428b4ce3c32bc2451f31041acc2"
- , "repository": "https://github.com/just-buildsystem/rules-cc"
- , "subdir": "rules"
+ { "type": "archive"
+ , "content": "114266e2768df3fca92c13c359fb9dfccb53aa97"
+ , "fetch": "https://github.com/just-buildsystem/rules-cc/archive/1f8e8d060c0c554f4374351d350bf3d661126579.tar.gz"
+ , "sha256": "3689742cfa30a36538ffee5d56f4d2705d8d5e10e2a1c161740d1f6fc44dd42e"
+ , "subdir": "rules-cc-1f8e8d060c0c554f4374351d350bf3d661126579/rules"
}
}
, "rules/stage-0":
diff --git a/src/bootstrap/stage-0-busybox.TARGETS b/src/bootstrap/stage-0-busybox.TARGETS
index 3d0c315..a6964e1 100644
--- a/src/bootstrap/stage-0-busybox.TARGETS
+++ b/src/bootstrap/stage-0-busybox.TARGETS
@@ -57,6 +57,9 @@
, "${MAKE} HOSTCC=${CC} HOSTCXX=${CXX} CONFIG_EXTRA_LDLIBS=\"m resolv\" defconfig >configure.log 2>&1 || (cat configure.log && exit 1)"
, "${MAKE} -j${NJOBS} HOSTCC=${CC} HOSTCXX=${CXX} CONFIG_EXTRA_LDLIBS=\"m resolv\" >build.log 2>&1 || (cat configure.log build.log && exit 1)"
, "${MAKE} -j${NJOBS} HOSTCC=${CC} HOSTCXX=${CXX} CONFIG_EXTRA_LDLIBS=\"m resolv\" CONFIG_PREFIX=${DESTDIR} install >>build.log 2>&1 || (cat configure.log build.log && exit 1)"
+ , "cd ${DESTDIR}"
+ , "for d in sbin usr/bin usr/sbin; do cp -l bin/busybox $d; done"
+ , "for l in $(find sbin usr/bin usr/sbin -type l); do ln -sf busybox $l; done"
]
, "out_dirs": ["."]
}
diff --git a/src/bootstrap/stage-0-gcc.TARGETS b/src/bootstrap/stage-0-gcc.TARGETS
index 8a86620..777b947 100644
--- a/src/bootstrap/stage-0-gcc.TARGETS
+++ b/src/bootstrap/stage-0-gcc.TARGETS
@@ -138,6 +138,9 @@
, "cd ${DESTDIR}"
, "for f in $(find . -type f | grep '\\.o$'); do strip -g $f; done"
, "for f in $(find . -type f | grep '\\.a$'); do strip -g $f; done"
+ , "GCC_LIBDIR=\"lib/gcc/$(./bin/gcc -dumpmachine)/$(./bin/gcc -dumpfullversion -dumpversion)\""
+ , "mv ${GCC_LIBDIR}/include-fixed ${TMPDIR}/"
+ , "cp -rL ${TMPDIR}/include-fixed ${GCC_LIBDIR}/. # resolve symlinks"
, "cd ${DESTDIR}/bin"
, "mv gcc gcc.real"
, "mv g++ g++.real"
diff --git a/src/bootstrap/stage-1-gcc.TARGETS b/src/bootstrap/stage-1-gcc.TARGETS
index 42282ca..c8b3a32 100644
--- a/src/bootstrap/stage-1-gcc.TARGETS
+++ b/src/bootstrap/stage-1-gcc.TARGETS
@@ -142,6 +142,9 @@
, "find . -type f -name '*.so*' -exec sh -c \"strip {} 2>/dev/null\" \\;"
, "find . -type f -name '*.a' -exec sh -c \"strip -g {}\" \\;"
, "find . -type f -name '*.o' -exec sh -c \"strip -g {}\" \\;"
+ , "GCC_LIBDIR=\"lib/gcc/$(./bin/gcc -dumpmachine)/$(./bin/gcc -dumpfullversion -dumpversion)\""
+ , "mv ${GCC_LIBDIR}/include-fixed ${TMPDIR}/"
+ , "cp -rL ${TMPDIR}/include-fixed ${GCC_LIBDIR}/. # resolve symlinks"
, "if [ -n \"${LINK_ARGS}\" ]; then"
, " cd ${DESTDIR}/bin"
, " mv gcc gcc.real"
diff --git a/src/compilers/clang-16-native.TARGETS b/src/compilers/clang-16-native.TARGETS
index 1b256fc..cafed88 100644
--- a/src/compilers/clang-16-native.TARGETS
+++ b/src/compilers/clang-16-native.TARGETS
@@ -187,15 +187,15 @@
{ "type": "generic"
, "arguments_config": ["ENV"]
, "deps": ["toolchain"]
- , "cmds": [":"]
- , "outs": ["lib64/libstdc++.so.6"]
+ , "cmds": ["cp -L lib64/libstdc++.so.6 ."]
+ , "outs": ["libstdc++.so.6"]
, "env": {"type": "var", "name": "ENV", "default": {"type": "empty_map"}}
}
, "libc++_files":
{ "type": "generic"
, "arguments_config": ["ENV"]
, "deps": ["toolchain"]
- , "cmds": ["cp lib/$(uname -m)-*/libc++.so.1 ."]
+ , "cmds": ["cp -L lib/$(uname -m)-*/libc++.so.1 ."]
, "outs": ["libc++.so.1"]
, "env": {"type": "var", "name": "ENV", "default": {"type": "empty_map"}}
}
@@ -203,7 +203,7 @@
{ "type": "generic"
, "arguments_config": ["ENV"]
, "deps": ["toolchain"]
- , "cmds": ["cp lib/$(uname -m)-*/libc++abi.so.1 ."]
+ , "cmds": ["cp -L lib/$(uname -m)-*/libc++abi.so.1 ."]
, "outs": ["libc++abi.so.1"]
, "env": {"type": "var", "name": "ENV", "default": {"type": "empty_map"}}
}
@@ -211,16 +211,16 @@
{ "type": "generic"
, "arguments_config": ["ENV"]
, "deps": ["toolchain"]
- , "cmds": [":"]
- , "outs": ["lib64/libgcc_s.so.1"]
+ , "cmds": ["cp -L lib64/libgcc_s.so.1 ."]
+ , "outs": ["libgcc_s.so.1"]
, "env": {"type": "var", "name": "ENV", "default": {"type": "empty_map"}}
}
, "libatomic_files":
{ "type": "generic"
, "arguments_config": ["ENV"]
, "deps": ["toolchain"]
- , "cmds": [":"]
- , "outs": ["lib64/libatomic.so.1"]
+ , "cmds": ["cp -L lib64/libatomic.so.1 ."]
+ , "outs": ["libatomic.so.1"]
, "env": {"type": "var", "name": "ENV", "default": {"type": "empty_map"}}
}
}
diff --git a/src/compilers/clang-17-native.TARGETS b/src/compilers/clang-17-native.TARGETS
index 64ff374..498949a 100644
--- a/src/compilers/clang-17-native.TARGETS
+++ b/src/compilers/clang-17-native.TARGETS
@@ -187,15 +187,15 @@
{ "type": "generic"
, "arguments_config": ["ENV"]
, "deps": ["toolchain"]
- , "cmds": [":"]
- , "outs": ["lib64/libstdc++.so.6"]
+ , "cmds": ["cp -L lib64/libstdc++.so.6 ."]
+ , "outs": ["libstdc++.so.6"]
, "env": {"type": "var", "name": "ENV", "default": {"type": "empty_map"}}
}
, "libc++_files":
{ "type": "generic"
, "arguments_config": ["ENV"]
, "deps": ["toolchain"]
- , "cmds": ["cp lib/$(uname -m)-*/libc++.so.1 ."]
+ , "cmds": ["cp -L lib/$(uname -m)-*/libc++.so.1 ."]
, "outs": ["libc++.so.1"]
, "env": {"type": "var", "name": "ENV", "default": {"type": "empty_map"}}
}
@@ -203,7 +203,7 @@
{ "type": "generic"
, "arguments_config": ["ENV"]
, "deps": ["toolchain"]
- , "cmds": ["cp lib/$(uname -m)-*/libc++abi.so.1 ."]
+ , "cmds": ["cp -L lib/$(uname -m)-*/libc++abi.so.1 ."]
, "outs": ["libc++abi.so.1"]
, "env": {"type": "var", "name": "ENV", "default": {"type": "empty_map"}}
}
@@ -211,16 +211,16 @@
{ "type": "generic"
, "arguments_config": ["ENV"]
, "deps": ["toolchain"]
- , "cmds": [":"]
- , "outs": ["lib64/libgcc_s.so.1"]
+ , "cmds": ["cp -L lib64/libgcc_s.so.1 ."]
+ , "outs": ["libgcc_s.so.1"]
, "env": {"type": "var", "name": "ENV", "default": {"type": "empty_map"}}
}
, "libatomic_files":
{ "type": "generic"
, "arguments_config": ["ENV"]
, "deps": ["toolchain"]
- , "cmds": [":"]
- , "outs": ["lib64/libatomic.so.1"]
+ , "cmds": ["cp -L lib64/libatomic.so.1 ."]
+ , "outs": ["libatomic.so.1"]
, "env": {"type": "var", "name": "ENV", "default": {"type": "empty_map"}}
}
}
diff --git a/src/compilers/gcc-13-musl-static.TARGETS b/src/compilers/gcc-13-musl-static.TARGETS
index d7cefea..109ec85 100644
--- a/src/compilers/gcc-13-musl-static.TARGETS
+++ b/src/compilers/gcc-13-musl-static.TARGETS
@@ -81,7 +81,10 @@
, " cp -l $f $(echo $f | sed 's|/'${TARGET}-'|/|g')"
, "done"
, "cp -rl ./${TARGET}/lib/. ./lib/."
- , "find . -type l ! -exec test -e {} \\; -delete"
+ , "find . -type l -exec sh -c 'expr match \"$(readlink {})\" \"/\" >/dev/null' \\; -delete"
+ , "GCC_LIBDIR=\"lib/gcc/$(./bin/gcc -dumpmachine)/$(./bin/gcc -dumpfullversion -dumpversion)\""
+ , "mv ${GCC_LIBDIR}/include-fixed ${TMPDIR}/"
+ , "cp -rL ${TMPDIR}/include-fixed ${GCC_LIBDIR}/. # resolve symlinks"
]
}
, "out_dirs": ["."]
@@ -114,8 +117,8 @@
{ "type": "generic"
, "arguments_config": ["ENV"]
, "deps": ["toolchain_for_target"]
- , "cmds": [":"]
- , "outs": ["lib/libgcc_s.so.1"]
+ , "cmds": ["cp -L lib/libgcc_s.so.1 ."]
+ , "outs": ["libgcc_s.so.1"]
, "env": {"type": "var", "name": "ENV", "default": {"type": "empty_map"}}
}
}
diff --git a/src/compilers/gcc-13-musl.TARGETS b/src/compilers/gcc-13-musl.TARGETS
index 90d7987..ef226eb 100644
--- a/src/compilers/gcc-13-musl.TARGETS
+++ b/src/compilers/gcc-13-musl.TARGETS
@@ -107,7 +107,10 @@
, " cp -l $f $(echo $f | sed 's|/'${TARGET}-'|/|g')"
, "done"
, "cp -rl ./${TARGET}/lib/. ./lib/."
- , "find . -type l ! -exec test -e {} \\; -delete"
+ , "find . -type l -exec sh -c 'expr match \"$(readlink {})\" \"/\" >/dev/null' \\; -delete"
+ , "GCC_LIBDIR=\"lib/gcc/$(./bin/gcc -dumpmachine)/$(./bin/gcc -dumpfullversion -dumpversion)\""
+ , "mv ${GCC_LIBDIR}/include-fixed ${TMPDIR}/"
+ , "cp -rL ${TMPDIR}/include-fixed ${GCC_LIBDIR}/. # resolve symlinks"
]
}
, "out_dirs": ["."]
@@ -146,16 +149,16 @@
{ "type": "generic"
, "arguments_config": ["ENV"]
, "deps": ["toolchain_for_target"]
- , "cmds": [":"]
- , "outs": ["lib/libstdc++.so.6"]
+ , "cmds": ["cp -L lib/libstdc++.so.6 ."]
+ , "outs": ["libstdc++.so.6"]
, "env": {"type": "var", "name": "ENV", "default": {"type": "empty_map"}}
}
, "libgcc_s_files":
{ "type": "generic"
, "arguments_config": ["ENV"]
, "deps": ["toolchain_for_target"]
- , "cmds": [":"]
- , "outs": ["lib/libgcc_s.so.1"]
+ , "cmds": ["cp -L lib/libgcc_s.so.1 ."]
+ , "outs": ["libgcc_s.so.1"]
, "env": {"type": "var", "name": "ENV", "default": {"type": "empty_map"}}
}
}
diff --git a/src/compilers/gcc-13-native.TARGETS b/src/compilers/gcc-13-native.TARGETS
index 3b79d36..27cdf80 100644
--- a/src/compilers/gcc-13-native.TARGETS
+++ b/src/compilers/gcc-13-native.TARGETS
@@ -152,6 +152,9 @@
, "find . -type f -name '*.so*' -exec sh -c \"strip {} 2>/dev/null\" \\;"
, "find . -type f -name '*.a' -exec sh -c \"strip -g {}\" \\;"
, "find . -type f -name '*.o' -exec sh -c \"strip -g {}\" \\;"
+ , "GCC_LIBDIR=\"lib/gcc/$(./bin/gcc -dumpmachine)/$(./bin/gcc -dumpfullversion -dumpversion)\""
+ , "mv ${GCC_LIBDIR}/include-fixed ${TMPDIR}/"
+ , "cp -rL ${TMPDIR}/include-fixed ${GCC_LIBDIR}/. # resolve symlinks"
, "if [ -n \"${LINK_ARGS}\" ]; then"
, " cd ${DESTDIR}/bin"
, " mv gcc gcc.real"
@@ -178,16 +181,16 @@
{ "type": "generic"
, "arguments_config": ["ENV"]
, "deps": ["toolchain"]
- , "cmds": [":"]
- , "outs": ["lib64/libstdc++.so.6"]
+ , "cmds": ["cp -L lib64/libstdc++.so.6 ."]
+ , "outs": ["libstdc++.so.6"]
, "env": {"type": "var", "name": "ENV", "default": {"type": "empty_map"}}
}
, "libgcc_s_files":
{ "type": "generic"
, "arguments_config": ["ENV"]
, "deps": ["toolchain"]
- , "cmds": [":"]
- , "outs": ["lib64/libgcc_s.so.1"]
+ , "cmds": ["cp -L lib64/libgcc_s.so.1 ."]
+ , "outs": ["libgcc_s.so.1"]
, "env": {"type": "var", "name": "ENV", "default": {"type": "empty_map"}}
}
}
diff --git a/src/tools/busybox-1.36.TARGETS b/src/tools/busybox-1.36.TARGETS
index ab5d90b..f569c0d 100644
--- a/src/tools/busybox-1.36.TARGETS
+++ b/src/tools/busybox-1.36.TARGETS
@@ -15,6 +15,9 @@
, "${MAKE} HOSTCC=\"${CC} -static\" HOSTCXX=\"${CXX} -static\" defconfig >configure.log 2>&1 || (cat configure.log && exit 1)"
, "${MAKE} -j${NJOBS} HOSTCC=\"${CC} -static\" HOSTCXX=\"${CXX} -static\" >build.log 2>&1 || (cat configure.log build.log && exit 1)"
, "${MAKE} -j${NJOBS} HOSTCC=\"${CC} -static\" HOSTCXX=\"${CXX} -static\" CONFIG_PREFIX=${DESTDIR} install >>build.log 2>&1 || (cat configure.log build.log && exit 1)"
+ , "cd ${DESTDIR}"
+ , "for d in sbin usr/bin usr/sbin; do cp -l bin/busybox $d; done"
+ , "for l in $(find sbin usr/bin usr/sbin -type l); do ln -sf busybox $l; done"
]
, "out_dirs": ["."]
}