mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-02 13:00:23 +00:00
minimal-bootstrap.gcc*: Add GCC wrapper test
This commit is contained in:
@@ -462,7 +462,7 @@ lib.makeScope
|
||||
echo ${gcc46.tests.get-version}
|
||||
echo ${gcc46-cxx.tests.hello-world}
|
||||
echo ${gcc10.tests.hello-world}
|
||||
echo ${gcc-latest-unwrapped.tests.hello-world}
|
||||
echo ${gcc-latest.tests.hello-world}
|
||||
''
|
||||
+ (lib.strings.optionalString (hostPlatform.libc == "glibc") ''
|
||||
echo ${gcc-glibc.tests.hello-world}
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
xz,
|
||||
bash-build,
|
||||
gnused,
|
||||
buildPlatform,
|
||||
targetPlatform,
|
||||
libc,
|
||||
libgcc,
|
||||
@@ -25,7 +26,30 @@ bash-build.runCommand "${pname}-${gcc-unwrapped.version}"
|
||||
version = gcc-unwrapped.version;
|
||||
meta = gcc-unwrapped.meta;
|
||||
nativeBuildInputs = [ gnused ];
|
||||
passthru.unwrapped = gcc-unwrapped;
|
||||
passthru = {
|
||||
unwrapped = gcc-unwrapped;
|
||||
tests.hello-world =
|
||||
result:
|
||||
bash-build.runCommand "${pname}-simple-program-${gcc-unwrapped.version}"
|
||||
{
|
||||
nativeBuildInputs = [
|
||||
binutils
|
||||
result
|
||||
];
|
||||
}
|
||||
''
|
||||
cat <<EOF >> test.c
|
||||
#include <stdio.h>
|
||||
int main() {
|
||||
printf("Hello World!\n");
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
${targetPlatform.config}-gcc -o test test.c
|
||||
${lib.optionalString (buildPlatform.canExecute targetPlatform) "./test"}
|
||||
mkdir $out
|
||||
'';
|
||||
};
|
||||
}
|
||||
''
|
||||
if [[ -z '${dynamicLinkerGlob}' ]]; then
|
||||
|
||||
Reference in New Issue
Block a user