Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gcc49: backport retpoline support #39914

Merged
merged 2 commits into from May 4, 2018
Merged

gcc49: backport retpoline support #39914

merged 2 commits into from May 4, 2018

Conversation

nlewo
Copy link
Member

@nlewo nlewo commented May 3, 2018

To mitigate Spectre Variant 2, GCC needs to have retpoline
support (-mindirect-branch and -mfunction-return arguments on amd64
and i386).

Patches were pulled from H.J. Lu's backport branch to
4.9 (hjl/indirect/gcc-4_9-branch), available at
https://github.com/hjl-tools/gcc/tree/hjl/indirect/gcc-4_9-branch/master. Upstream
GCC does not apply patches to anything older than the
gcc-6-branch. H.J. Lu is the author of the upstream retpoline commits
as well.

Several Linux distributions already backported these patches to GCC 4
branches and some old kernels (3.13 for instance) have been recompiled
with these GCC patches. These kernels only allow to load kernel
modules that are compiled with the retpoline support.

References:

Fixes #38394

Things done

I built a kernel module with this gcc49 and the vermagic field contains the retpoline string.

  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

To mitigate Spectre Variant 2, GCC needs to have retpoline
support (-mindirect-branch and -mfunction-return arguments on amd64
and i386).

Patches were pulled from H.J. Lu's backport branch to
4.9 (hjl/indirect/gcc-4_9-branch), available at
https://github.com/hjl-tools/gcc/tree/hjl/indirect/gcc-4_9-branch/master. Upstream
GCC does not apply patches to anything older than the
gcc-6-branch. H.J. Lu is the author of the upstream retpoline commits
as well.

Several Linux distributions already backported these patches to GCC 4
branches and some old kernels (3.13 for instance) have been recompiled
with these GCC patches. These kernels only allow to load kernel
modules that are compiled with the retpoline support.

References:
- Ubuntu bug: https://bugs.launchpad.net/ubuntu/+source/gcc-4.8/+bug/1749261
- Ubuntu package: https://launchpad.net/ubuntu/+source/gcc-4.8/4.8.4-2ubuntu1~14.04.4

Fixes NixOS#38394
@Mic92
Copy link
Member

Mic92 commented May 3, 2018

@GrahamcOfBorg build gcc49

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Attempted: gcc49

Partial log (click to expand)

rm gcc.pod
make[3]: Leaving directory '/private/tmp/nix-build-gcc-4.9.4.drv-0/build/gcc'
make[2]: *** [Makefile:4235: all-stage1-gcc] Error 2
make[2]: Leaving directory '/private/tmp/nix-build-gcc-4.9.4.drv-0/build'
make[1]: *** [Makefile:17844: stage1-bubble] Error 2
make[1]: Leaving directory '/private/tmp/nix-build-gcc-4.9.4.drv-0/build'
make: *** [Makefile:18149: bootstrap] Error 2
builder for '/nix/store/4yp2md3wqw36zxwad8x543vc01wqj0iz-gcc-4.9.4.drv' failed with exit code 2
cannot build derivation '/nix/store/cyw66czqaiymbl5r6g26f7g79xkdvqnj-gcc-wrapper-4.9.4.drv': 1 dependencies couldn't be built
error: build of '/nix/store/cyw66czqaiymbl5r6g26f7g79xkdvqnj-gcc-wrapper-4.9.4.drv' failed

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: gcc49

Partial log (click to expand)

no configure script, doing nothing
installing
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/gnbszbwsfm008rlig17hq4v8zwc5xkvr-gcc-wrapper-4.9.4
strip is /nix/store/j75dgadrff2d1fyc4fczmcgqkid2imdx-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/gnbszbwsfm008rlig17hq4v8zwc5xkvr-gcc-wrapper-4.9.4/bin
patching script interpreter paths in /nix/store/gnbszbwsfm008rlig17hq4v8zwc5xkvr-gcc-wrapper-4.9.4
checking for references to /build in /nix/store/gnbszbwsfm008rlig17hq4v8zwc5xkvr-gcc-wrapper-4.9.4...
strip is /nix/store/j75dgadrff2d1fyc4fczmcgqkid2imdx-binutils-2.30/bin/strip
strip is /nix/store/j75dgadrff2d1fyc4fczmcgqkid2imdx-binutils-2.30/bin/strip

@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Attempted: gcc49

Partial log (click to expand)

/build/build/./prev-gcc/xg++ -B/build/build/./prev-gcc/ -B/nix/store/y6gkiglc3mv94wr16gvsjf424hm1z44k-gcc-4.9.4/x86_64-unknown-linux-gnu/bin/ -nostdinc++ -B/build/build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs -B/build/build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs  -I/build/build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/include/x86_64-unknown-linux-gnu  -I/build/build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/include  -I/build/gcc-4.9.4/libstdc++-v3/libsupc++ -L/build/build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs -L/build/build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs -c   -O2 -I/nix/store/lb3kkvyylnbcxn5jad9i11szxlhkpkjq-glibc-2.27-dev/include -B/nix/store/27x7pinqdsl9f3rpbm8bsszd9fhwq266-glibc-2.27/lib/ -idirafter /nix/store/lb3kkvyylnbcxn5jad9i11szxlhkpkjq-glibc-2.27-dev/include -idirafter /nix/store/ng5kbr6kmh979qaachifbsbblydrcmqc-gcc-7.3.0/lib/gcc/x86_64-unknown-linux-gnu/7.3.0/include-fixed -Wl,-rpath,/nix/store/hiw9kf1v6xlkhnkqkl8i3v9800l272dg-gcc-4.9.4-lib/lib -Wl,-L/nix/store/27x7pinqdsl9f3rpbm8bsszd9fhwq266-glibc-2.27/lib -Wl,-rpath -Wl,/nix/store/27x7pinqdsl9f3rpbm8bsszd9fhwq266-glibc-2.27/lib -Wl,-L/nix/store/27x7pinqdsl9f3rpbm8bsszd9fhwq266-glibc-2.27/lib -gtoggle -fprofile-generate -DIN_GCC    -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H -I. -I. -I../../gcc-4.9.4/gcc -I../../gcc-4.9.4/gcc/. -I../../gcc-4.9.4/gcc/../include -I../../gcc-4.9.4/gcc/../libcpp/include -I/nix/store/70g2i2v6dqm5ss9p2m1jb8f2swsz46qh-gmp-6.1.2-dev/include -I/nix/store/9r9gfi5flhxgc0qsjiazgllsa38ws8qx-mpfr-3.1.6-dev/include -I/nix/store/cqp80wjr298kp1gvrqa6pj1n7i9rqsh6-libmpc-1.1.0/include  -I../../gcc-4.9.4/gcc/../libdecnumber -I../../gcc-4.9.4/gcc/../libdecnumber/bid -I../libdecnumber -I../../gcc-4.9.4/gcc/../libbacktrace -DCLOOG_INT_GMP -I/nix/store/x3accwp3mw25ynwpyk83x621fvrs06dr-cloog-0.18.0/include -I/nix/store/lki1i0hm11yvyg7xpp3148yd7ps5hizj-isl-0.11.1/include  -o insn-peep.o -MT insn-peep.o -MMD -MP -MF ./.deps/insn-peep.TPo insn-peep.c
build/genpreds ../../gcc-4.9.4/gcc/config/i386/i386.md > tmp-preds.c
/nix/store/xn5gv3lpfy91yvfy9b0i7klfcxh9xskz-bash-4.4-p19/bin/bash ../../gcc-4.9.4/gcc/../move-if-change tmp-preds.c insn-preds.c
echo timestamp > s-preds
/build/build/./prev-gcc/xg++ -B/build/build/./prev-gcc/ -B/nix/store/y6gkiglc3mv94wr16gvsjf424hm1z44k-gcc-4.9.4/x86_64-unknown-linux-gnu/bin/ -nostdinc++ -B/build/build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs -B/build/build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs  -I/build/build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/include/x86_64-unknown-linux-gnu  -I/build/build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/include  -I/build/gcc-4.9.4/libstdc++-v3/libsupc++ -L/build/build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs -L/build/build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs -c   -O2 -I/nix/store/lb3kkvyylnbcxn5jad9i11szxlhkpkjq-glibc-2.27-dev/include -B/nix/store/27x7pinqdsl9f3rpbm8bsszd9fhwq266-glibc-2.27/lib/ -idirafter /nix/store/lb3kkvyylnbcxn5jad9i11szxlhkpkjq-glibc-2.27-dev/include -idirafter /nix/store/ng5kbr6kmh979qaachifbsbblydrcmqc-gcc-7.3.0/lib/gcc/x86_64-unknown-linux-gnu/7.3.0/include-fixed -Wl,-rpath,/nix/store/hiw9kf1v6xlkhnkqkl8i3v9800l272dg-gcc-4.9.4-lib/lib -Wl,-L/nix/store/27x7pinqdsl9f3rpbm8bsszd9fhwq266-glibc-2.27/lib -Wl,-rpath -Wl,/nix/store/27x7pinqdsl9f3rpbm8bsszd9fhwq266-glibc-2.27/lib -Wl,-L/nix/store/27x7pinqdsl9f3rpbm8bsszd9fhwq266-glibc-2.27/lib -gtoggle -fprofile-generate -DIN_GCC    -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H -I. -I. -I../../gcc-4.9.4/gcc -I../../gcc-4.9.4/gcc/. -I../../gcc-4.9.4/gcc/../include -I../../gcc-4.9.4/gcc/../libcpp/include -I/nix/store/70g2i2v6dqm5ss9p2m1jb8f2swsz46qh-gmp-6.1.2-dev/include -I/nix/store/9r9gfi5flhxgc0qsjiazgllsa38ws8qx-mpfr-3.1.6-dev/include -I/nix/store/cqp80wjr298kp1gvrqa6pj1n7i9rqsh6-libmpc-1.1.0/include  -I../../gcc-4.9.4/gcc/../libdecnumber -I../../gcc-4.9.4/gcc/../libdecnumber/bid -I../libdecnumber -I../../gcc-4.9.4/gcc/../libbacktrace -DCLOOG_INT_GMP -I/nix/store/x3accwp3mw25ynwpyk83x621fvrs06dr-cloog-0.18.0/include -I/nix/store/lki1i0hm11yvyg7xpp3148yd7ps5hizj-isl-0.11.1/include  -o insn-preds.o -MT insn-preds.o -MMD -MP -MF ./.deps/insn-preds.TPo insn-preds.c
/build/build/./prev-gcc/xg++ -B/build/build/./prev-gcc/ -B/nix/store/y6gkiglc3mv94wr16gvsjf424hm1z44k-gcc-4.9.4/x86_64-unknown-linux-gnu/bin/ -nostdinc++ -B/build/build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs -B/build/build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs  -I/build/build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/include/x86_64-unknown-linux-gnu  -I/build/build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/include  -I/build/gcc-4.9.4/libstdc++-v3/libsupc++ -L/build/build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs -L/build/build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs -c   -O2 -I/nix/store/lb3kkvyylnbcxn5jad9i11szxlhkpkjq-glibc-2.27-dev/include -B/nix/store/27x7pinqdsl9f3rpbm8bsszd9fhwq266-glibc-2.27/lib/ -idirafter /nix/store/lb3kkvyylnbcxn5jad9i11szxlhkpkjq-glibc-2.27-dev/include -idirafter /nix/store/ng5kbr6kmh979qaachifbsbblydrcmqc-gcc-7.3.0/lib/gcc/x86_64-unknown-linux-gnu/7.3.0/include-fixed -Wl,-rpath,/nix/store/hiw9kf1v6xlkhnkqkl8i3v9800l272dg-gcc-4.9.4-lib/lib -Wl,-L/nix/store/27x7pinqdsl9f3rpbm8bsszd9fhwq266-glibc-2.27/lib -Wl,-rpath -Wl,/nix/store/27x7pinqdsl9f3rpbm8bsszd9fhwq266-glibc-2.27/lib -Wl,-L/nix/store/27x7pinqdsl9f3rpbm8bsszd9fhwq266-glibc-2.27/lib -gtoggle -fprofile-generate -DIN_GCC    -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild -I../../gcc-4.9.4/gcc -I../../gcc-4.9.4/gcc/build -I../../gcc-4.9.4/gcc/../include  -I../../gcc-4.9.4/gcc/../libcpp/include  \
	-o build/genrecog.o ../../gcc-4.9.4/gcc/genrecog.c
building of '/nix/store/v0vq4maypcal0573yjjfw4dabw759qz1-gcc-4.9.4.drv' timed out after 3600 seconds
cannot build derivation '/nix/store/2q7xibllq5ww2jzcjh15rxf5s41b76ka-gcc-wrapper-4.9.4.drv': 1 dependencies couldn't be built
error: build of '/nix/store/2q7xibllq5ww2jzcjh15rxf5s41b76ka-gcc-wrapper-4.9.4.drv' failed

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: gcc49

Partial log (click to expand)

acquiring/releasing lock: Resource deadlock avoided
copying path '/nix/store/ym752fxjrqvj42fd5qcmbdw3hnq44iwg-gmp-6.1.2-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/dyybm0d8hadwm6zmxjslb8hjgm21psm4-isl-0.11.1' from 'https://cache.nixos.org'...
copying path '/nix/store/ix6j7wwy3avx6rrczq4wnfcn5rarhk3f-mpfr-3.1.6' from 'https://cache.nixos.org'...
copying path '/nix/store/6k6hzkgwa0pc41a6xvw9rkmk13paflhw-mpfr-3.1.6-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/fri98sbc2yfhzb4lbza5arj1s89gwikb-libmpc-1.1.0' from 'https://cache.nixos.org'...
copying path '/nix/store/5m1hc2sd9s4497lf2gzxvqbs16why22a-cloog-0.18.0' from 'https://cache.nixos.org'...
cannot build derivation '/nix/store/bc4g4zbnvwkl9wh40b98kfy0mz0r1b93-gcc-4.9.4.drv': 15 dependencies couldn't be built
cannot build derivation '/nix/store/0g803mypjmb45wki7inl6qyvmk093qsv-gcc-wrapper-4.9.4.drv': 1 dependencies couldn't be built
�[31;1merror:�[0m build of '/nix/store/0g803mypjmb45wki7inl6qyvmk093qsv-gcc-wrapper-4.9.4.drv' failed

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: gcc49

Partial log (click to expand)

installing
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/62afwq54bh5vx23vfjb1pp1x53fqac6k-gcc-wrapper-4.9.4
strip is /nix/store/gp7fylxwn18b7pl2c18ks89hsiaxyfvf-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/62afwq54bh5vx23vfjb1pp1x53fqac6k-gcc-wrapper-4.9.4/bin
patching script interpreter paths in /nix/store/62afwq54bh5vx23vfjb1pp1x53fqac6k-gcc-wrapper-4.9.4
checking for references to /build in /nix/store/62afwq54bh5vx23vfjb1pp1x53fqac6k-gcc-wrapper-4.9.4...
strip is /nix/store/gp7fylxwn18b7pl2c18ks89hsiaxyfvf-binutils-2.30/bin/strip
strip is /nix/store/gp7fylxwn18b7pl2c18ks89hsiaxyfvf-binutils-2.30/bin/strip
/nix/store/62afwq54bh5vx23vfjb1pp1x53fqac6k-gcc-wrapper-4.9.4

@Mic92
Copy link
Member

Mic92 commented May 3, 2018

Please disable darwin support for now or mark it as broken. Since this version is not widely used it should not be a big deal.

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: gcc49

Partial log (click to expand)

/nix/store/62afwq54bh5vx23vfjb1pp1x53fqac6k-gcc-wrapper-4.9.4

@nlewo
Copy link
Member Author

nlewo commented May 3, 2018

@Mic92 done.

@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Attempted: gcc49

Partial log (click to expand)

/build/build/./prev-gcc/xg++ -B/build/build/./prev-gcc/ -B/nix/store/y6gkiglc3mv94wr16gvsjf424hm1z44k-gcc-4.9.4/x86_64-unknown-linux-gnu/bin/ -nostdinc++ -B/build/build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs -B/build/build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs  -I/build/build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/include/x86_64-unknown-linux-gnu  -I/build/build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/include  -I/build/gcc-4.9.4/libstdc++-v3/libsupc++ -L/build/build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs -L/build/build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs -c   -O2 -I/nix/store/lb3kkvyylnbcxn5jad9i11szxlhkpkjq-glibc-2.27-dev/include -B/nix/store/27x7pinqdsl9f3rpbm8bsszd9fhwq266-glibc-2.27/lib/ -idirafter /nix/store/lb3kkvyylnbcxn5jad9i11szxlhkpkjq-glibc-2.27-dev/include -idirafter /nix/store/ng5kbr6kmh979qaachifbsbblydrcmqc-gcc-7.3.0/lib/gcc/x86_64-unknown-linux-gnu/7.3.0/include-fixed -Wl,-rpath,/nix/store/hiw9kf1v6xlkhnkqkl8i3v9800l272dg-gcc-4.9.4-lib/lib -Wl,-L/nix/store/27x7pinqdsl9f3rpbm8bsszd9fhwq266-glibc-2.27/lib -Wl,-rpath -Wl,/nix/store/27x7pinqdsl9f3rpbm8bsszd9fhwq266-glibc-2.27/lib -Wl,-L/nix/store/27x7pinqdsl9f3rpbm8bsszd9fhwq266-glibc-2.27/lib -gtoggle -fprofile-generate -DIN_GCC    -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H -I. -I. -I../../gcc-4.9.4/gcc -I../../gcc-4.9.4/gcc/. -I../../gcc-4.9.4/gcc/../include -I../../gcc-4.9.4/gcc/../libcpp/include -I/nix/store/70g2i2v6dqm5ss9p2m1jb8f2swsz46qh-gmp-6.1.2-dev/include -I/nix/store/9r9gfi5flhxgc0qsjiazgllsa38ws8qx-mpfr-3.1.6-dev/include -I/nix/store/cqp80wjr298kp1gvrqa6pj1n7i9rqsh6-libmpc-1.1.0/include  -I../../gcc-4.9.4/gcc/../libdecnumber -I../../gcc-4.9.4/gcc/../libdecnumber/bid -I../libdecnumber -I../../gcc-4.9.4/gcc/../libbacktrace -DCLOOG_INT_GMP -I/nix/store/x3accwp3mw25ynwpyk83x621fvrs06dr-cloog-0.18.0/include -I/nix/store/lki1i0hm11yvyg7xpp3148yd7ps5hizj-isl-0.11.1/include  -o insn-preds.o -MT insn-preds.o -MMD -MP -MF ./.deps/insn-preds.TPo insn-preds.c
/build/build/./prev-gcc/xg++ -B/build/build/./prev-gcc/ -B/nix/store/y6gkiglc3mv94wr16gvsjf424hm1z44k-gcc-4.9.4/x86_64-unknown-linux-gnu/bin/ -nostdinc++ -B/build/build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs -B/build/build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs  -I/build/build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/include/x86_64-unknown-linux-gnu  -I/build/build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/include  -I/build/gcc-4.9.4/libstdc++-v3/libsupc++ -L/build/build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs -L/build/build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs -c   -O2 -I/nix/store/lb3kkvyylnbcxn5jad9i11szxlhkpkjq-glibc-2.27-dev/include -B/nix/store/27x7pinqdsl9f3rpbm8bsszd9fhwq266-glibc-2.27/lib/ -idirafter /nix/store/lb3kkvyylnbcxn5jad9i11szxlhkpkjq-glibc-2.27-dev/include -idirafter /nix/store/ng5kbr6kmh979qaachifbsbblydrcmqc-gcc-7.3.0/lib/gcc/x86_64-unknown-linux-gnu/7.3.0/include-fixed -Wl,-rpath,/nix/store/hiw9kf1v6xlkhnkqkl8i3v9800l272dg-gcc-4.9.4-lib/lib -Wl,-L/nix/store/27x7pinqdsl9f3rpbm8bsszd9fhwq266-glibc-2.27/lib -Wl,-rpath -Wl,/nix/store/27x7pinqdsl9f3rpbm8bsszd9fhwq266-glibc-2.27/lib -Wl,-L/nix/store/27x7pinqdsl9f3rpbm8bsszd9fhwq266-glibc-2.27/lib -gtoggle -fprofile-generate -DIN_GCC    -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild -I../../gcc-4.9.4/gcc -I../../gcc-4.9.4/gcc/build -I../../gcc-4.9.4/gcc/../include  -I../../gcc-4.9.4/gcc/../libcpp/include  \
	-o build/genrecog.o ../../gcc-4.9.4/gcc/genrecog.c
/build/build/./prev-gcc/xg++ -B/build/build/./prev-gcc/ -B/nix/store/y6gkiglc3mv94wr16gvsjf424hm1z44k-gcc-4.9.4/x86_64-unknown-linux-gnu/bin/ -nostdinc++ -B/build/build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs -B/build/build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs  -I/build/build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/include/x86_64-unknown-linux-gnu  -I/build/build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/include  -I/build/gcc-4.9.4/libstdc++-v3/libsupc++ -L/build/build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs -L/build/build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs   -O2 -I/nix/store/lb3kkvyylnbcxn5jad9i11szxlhkpkjq-glibc-2.27-dev/include -B/nix/store/27x7pinqdsl9f3rpbm8bsszd9fhwq266-glibc-2.27/lib/ -idirafter /nix/store/lb3kkvyylnbcxn5jad9i11szxlhkpkjq-glibc-2.27-dev/include -idirafter /nix/store/ng5kbr6kmh979qaachifbsbblydrcmqc-gcc-7.3.0/lib/gcc/x86_64-unknown-linux-gnu/7.3.0/include-fixed -Wl,-rpath,/nix/store/hiw9kf1v6xlkhnkqkl8i3v9800l272dg-gcc-4.9.4-lib/lib -Wl,-L/nix/store/27x7pinqdsl9f3rpbm8bsszd9fhwq266-glibc-2.27/lib -Wl,-rpath -Wl,/nix/store/27x7pinqdsl9f3rpbm8bsszd9fhwq266-glibc-2.27/lib -Wl,-L/nix/store/27x7pinqdsl9f3rpbm8bsszd9fhwq266-glibc-2.27/lib -gtoggle -fprofile-generate -DIN_GCC    -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H -DGENERATOR_FILE -static-libstdc++ -static-libgcc -O2 -I/nix/store/lb3kkvyylnbcxn5jad9i11szxlhkpkjq-glibc-2.27-dev/include -B/nix/store/27x7pinqdsl9f3rpbm8bsszd9fhwq266-glibc-2.27/lib/ -idirafter /nix/store/lb3kkvyylnbcxn5jad9i11szxlhkpkjq-glibc-2.27-dev/include -idirafter /nix/store/ng5kbr6kmh979qaachifbsbblydrcmqc-gcc-7.3.0/lib/gcc/x86_64-unknown-linux-gnu/7.3.0/include-fixed -Wl,-rpath,/nix/store/hiw9kf1v6xlkhnkqkl8i3v9800l272dg-gcc-4.9.4-lib/lib -Wl,-L/nix/store/27x7pinqdsl9f3rpbm8bsszd9fhwq266-glibc-2.27/lib -Wl,-rpath -Wl,/nix/store/27x7pinqdsl9f3rpbm8bsszd9fhwq266-glibc-2.27/lib -Wl,-L/nix/store/27x7pinqdsl9f3rpbm8bsszd9fhwq266-glibc-2.27/lib -o build/genrecog \
    build/genrecog.o build/rtl.o build/read-rtl.o build/ggc-none.o build/vec.o build/min-insn-modes.o build/gensupport.o build/print-rtl.o build/read-md.o build/errors.o .././libiberty/libiberty.a
build/genrecog ../../gcc-4.9.4/gcc/config/i386/i386.md \
  insn-conditions.md > tmp-recog.c
building of '/nix/store/v0vq4maypcal0573yjjfw4dabw759qz1-gcc-4.9.4.drv' timed out after 3600 seconds
cannot build derivation '/nix/store/2q7xibllq5ww2jzcjh15rxf5s41b76ka-gcc-wrapper-4.9.4.drv': 1 dependencies couldn't be built
error: build of '/nix/store/2q7xibllq5ww2jzcjh15rxf5s41b76ka-gcc-wrapper-4.9.4.drv' failed

@nlewo
Copy link
Member Author

nlewo commented May 4, 2018

@GrahamcOfBorg build foundationdb

@Mic92
Copy link
Member

Mic92 commented May 4, 2018

If you can build foundationdb locally, this pull request should be fine.

@GrahamcOfBorg
Copy link

No attempt on aarch64-linux (full log)

The following builds were skipped because they don't evaluate on aarch64-linux: foundationdb

Partial log (click to expand)

Cannot nix-instantiate `foundationdb' because:
�[31;1merror:�[0m while evaluating the attribute 'buildInputs' of the derivation 'foundationdb-5.1.7' at �[1m/var/lib/gc-of-borg/nix-test-rs-30/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-30/pkgs/stdenv/generic/make-derivation.nix�[0m:148:11:
while evaluating the attribute 'buildInputs' of the derivation 'openjdk-8u172b11' at �[1m/var/lib/gc-of-borg/nix-test-rs-30/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-30/pkgs/stdenv/generic/make-derivation.nix�[0m:148:11:
while evaluating the attribute 'buildCommand' of the derivation 'openjdk-bootstrap' at �[1m/var/lib/gc-of-borg/nix-test-rs-30/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-30/pkgs/stdenv/generic/make-derivation.nix�[0m:148:11:
No bootstrap for system

@nlewo
Copy link
Member Author

nlewo commented May 4, 2018

I successfully built fondationdb locally:

nix-build -A foundationdb
/nix/store/qq8xfnz2r6s0p9zlv5n0a1ahq1v54sjl-foundationdb-5.1.7
/nix/store/ghbwyicmh69mwz2mz3qaxz6qll21bf4y-foundationdb-5.2.0pre1488_18f34548
/nix/store/fvcj689hxg7jcaw5ijph7p66nqzfc1lp-foundationdb-6.0.0pre1636_1265a7b6

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: foundationdb

Partial log (click to expand)

stripping (with command strip and flags -S) in /nix/store/c4yv869p75lm8y6b472l0694dc87jy09-foundationdb-5.2.0pre1488_18f34548-lib/lib
patching script interpreter paths in /nix/store/c4yv869p75lm8y6b472l0694dc87jy09-foundationdb-5.2.0pre1488_18f34548-lib
checking for references to /build in /nix/store/c4yv869p75lm8y6b472l0694dc87jy09-foundationdb-5.2.0pre1488_18f34548-lib...
shrinking RPATHs of ELF executables and libraries in /nix/store/kv1acrdfbdms3y0a3iiyanjfqsl2js54-foundationdb-5.2.0pre1488_18f34548-dev
strip is /nix/store/j75dgadrff2d1fyc4fczmcgqkid2imdx-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/kv1acrdfbdms3y0a3iiyanjfqsl2js54-foundationdb-5.2.0pre1488_18f34548-dev
checking for references to /build in /nix/store/kv1acrdfbdms3y0a3iiyanjfqsl2js54-foundationdb-5.2.0pre1488_18f34548-dev...
/nix/store/qq8xfnz2r6s0p9zlv5n0a1ahq1v54sjl-foundationdb-5.1.7
/nix/store/ghbwyicmh69mwz2mz3qaxz6qll21bf4y-foundationdb-5.2.0pre1488_18f34548
/nix/store/fvcj689hxg7jcaw5ijph7p66nqzfc1lp-foundationdb-6.0.0pre1636_1265a7b6

@Mic92 Mic92 merged commit 1537dca into NixOS:master May 4, 2018
@Mic92
Copy link
Member

Mic92 commented May 4, 2018

Backport to stable might be helpful as well.

@nlewo
Copy link
Member Author

nlewo commented May 4, 2018

@Mic92 yes. I'm waiting for the local build of foundationdb on stable to push it. Thanks.

@nlewo
Copy link
Member Author

nlewo commented May 5, 2018

Backported to 18.03 in 0a73111.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants