[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#796906: fails to build stage1 cross compiler for m68k



Source: gcc-5
Tags: patch
User: helmutg@debian.org
Usertags: rebootstrap

m68k implements does not have hardware supported atomics, so it falls
back to linux syscalls to implement atomics on that architecture even
when one builds a stage1 (without libc). However the Build-Depends do
not reflect that. Building the stage1 cross compiler for m68k without
linux-libc-dev installed results in the following error:

>From https://jenkins.debian.net/job/rebootstrap_m68k_gcc5/27/console
| /tmp/buildd/gcc1/gcc-5-5.2.1/build/./gcc/xgcc -B/tmp/buildd/gcc1/gcc-5-5.2.1/build/./gcc/ -B/usr/m68k-linux-gnu/bin/ -B/usr/m68k-linux-gnu/lib/ -isystem /usr/m68k-linux-gnu/include -isystem /usr/m68k-linux-gnu/sys-include -isystem /tmp/buildd/gcc1/gcc-5-5.2.1/build/sys-include    -g -O2 -O2  -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include   -fPIC -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -Dinhibit_libc  -fPIC -I. -I. -I../.././gcc -I../../../src/libgcc -I../../../src/libgcc/. -I../../../src/libgcc/../gcc -I../../../src/libgcc/../include  -DHAVE_CC_TLS  -o linux-atomic.o -MT linux-atomic.o -MD -MP -MF linux-atomic.dep  -c ../../../src/libgcc/config/m68k/linux-atomic.c -fvisibility=hidden -DHIDE_EXPORTS
| ../../../src/libgcc/config/m68k/linux-atomic.c:36:24: fatal error: asm/unistd.h: No such file or directory
| compilation terminated.
| ../../../src/libgcc/static-object.mk:17: recipe for target 'linux-atomic.o' failed
| make[4]: *** [linux-atomic.o] Error 1
| make[4]: Leaving directory '/tmp/buildd/gcc1/gcc-5-5.2.1/build/m68k-linux-gnu/libgcc'
| Makefile:10662: recipe for target 'all-target-libgcc' failed
| make[3]: *** [all-target-libgcc] Error 2
| make[3]: Leaving directory '/tmp/buildd/gcc1/gcc-5-5.2.1/build'
| Makefile:852: recipe for target 'all' failed
| make[2]: *** [all] Error 2
| make[2]: Leaving directory '/tmp/buildd/gcc1/gcc-5-5.2.1/build'
| s=`cat status`; rm -f status; test $s -eq 0
| debian/rules2:1169: recipe for target 'stamps/05-build-stamp' failed
| make[1]: *** [stamps/05-build-stamp] Error 1
| make[1]: Leaving directory '/tmp/buildd/gcc1/gcc-5-5.2.1'
| debian/rules:52: recipe for target 'stamps/05-build-stamp' failed
| make: *** [stamps/05-build-stamp] Error 2

I have not seen a similar error for any other architecture.

Thus I am proposing to add that dependency just for m68k, which is
implemented in the attached patch. Please consider applying it.

Helmut
diff --git a/debian/control b/debian/control
index 0a7807d..c27a523 100644
--- a/debian/control
+++ b/debian/control
@@ -7,7 +7,7 @@ Standards-Version: 3.9.6
 Build-Depends: debhelper (>= 5.0.62), dpkg-dev (>= 1.17.11), 
   g++-multilib [amd64 i386 kfreebsd-amd64 mips mips64 mips64el mipsel mipsn32 mipsn32el powerpc ppc64 s390 s390x sparc sparc64 x32], g++-4.9 [arm64], 
   libc6.1-dev (>= 2.13-5) [alpha ia64] | libc0.3-dev (>= 2.13-5) [hurd-i386] | libc0.1-dev (>= 2.13-5) [kfreebsd-i386 kfreebsd-amd64] | libc6-dev (>= 2.13-5), libc6-dev (>= 2.13-31) [armel armhf], libc6-dev-amd64 [i386 x32], libc6-dev-sparc64 [sparc], libc6-dev-sparc [sparc64], libc6-dev-s390 [s390x], libc6-dev-s390x [s390], libc6-dev-i386 [amd64 x32], libc6-dev-powerpc [ppc64], libc6-dev-ppc64 [powerpc], libc0.1-dev-i386 [kfreebsd-amd64], lib32gcc1 [amd64 ppc64 kfreebsd-amd64 mipsn32 mipsn32el mips64 mips64el s390x sparc64 x32], libn32gcc1 [mips mipsel mips64 mips64el], lib64gcc1 [i386 mips mipsel mipsn32 mipsn32el powerpc sparc s390 x32], libc6-dev-mips64 [mips mipsel mipsn32 mipsn32el], libc6-dev-mipsn32 [mips mipsel mips64 mips64el], libc6-dev-mips32 [mipsn32 mipsn32el mips64 mips64el], libc6-dev-x32 [amd64 i386], libx32gcc1 [amd64 i386], libc6.1-dbg [alpha ia64] | libc0.3-dbg [hurd-i386] | libc0.1-dbg [kfreebsd-i386 kfreebsd-amd64] | libc6-dbg, 
-  kfreebsd-kernel-headers (>= 0.84) [kfreebsd-any], 
+  kfreebsd-kernel-headers (>= 0.84) [kfreebsd-any], linux-libc-dev [m68k],
   m4, libtool, autoconf2.64, 
   libunwind7-dev (>= 0.98.5-6) [ia64], libatomic-ops-dev [ia64], 
   autogen, gawk, lzma, xz-utils, patchutils, 
diff --git a/debian/control.m4 b/debian/control.m4
index 251b37d..a65f051 100644
--- a/debian/control.m4
+++ b/debian/control.m4
@@ -60,7 +60,7 @@ Standards-Version: 3.9.6
 ifdef(`TARGET',`dnl cross
 Build-Depends: debhelper (>= 5.0.62), DPKG_BUILD_DEP
   LIBC_BUILD_DEP, LIBC_BIARCH_BUILD_DEP
-  kfreebsd-kernel-headers (>= 0.84) [kfreebsd-any],
+  kfreebsd-kernel-headers (>= 0.84) [kfreebsd-any], linux-libc-dev [m68k],
   LIBUNWIND_BUILD_DEP LIBATOMIC_OPS_BUILD_DEP AUTO_BUILD_DEP
   SOURCE_BUILD_DEP CROSS_BUILD_DEP
   ISL_BUILD_DEP MPC_BUILD_DEP MPFR_BUILD_DEP GMP_BUILD_DEP,

Reply to: