[pkg-boost-devel] Bug#794622: boost1.58: FTBFS on x32: Trying to build with -march=i686

Thorsten Glaser t.glaser at tarent.de
Tue Aug 11 11:46:20 UTC 2015


tags 794622 + patch
thanks

I’ve asked in #boost on IRC and looked through the mailing list archives
but so far, upstream doesn’t seem to have a fix.

Between 1.57 and 1.58, they added code that only handles a two-state
(32 bit/64 bit), but not the 32/64 flavour that x32 and MIPS N32 have.

I therefore experimented with a minimal patch to just address this
problem, which should not hurt i386 either because adding -march=i686
should not have been done there either as it breaks Pentium machines.
It does build. We’ll see whether it actually works.

Please find this patch applied for your convenience, and for forwar‐
ding upstream. Please do make sure this, or another patch fixing the
issue, ends up in the package, especially considering the transition.

Adam/Daniel: I’ve uploaded to unreleased.

Thanks,
//mirabilos
-- 
tarent solutions GmbH
Rochusstraße 2-4, D-53123 Bonn • http://www.tarent.de/
Tel: +49 228 54881-393 • Fax: +49 228 54881-235
HRB 5168 (AG Bonn) • USt-ID (VAT): DE122264941
Geschäftsführer: Dr. Stefan Barth, Kai Ebenrett, Boris Esser, Alexander Steeg
-------------- next part --------------
diff -Nru boost1.58-1.58.0+dfsg/debian/changelog boost1.58-1.58.0+dfsg/debian/changelog
--- boost1.58-1.58.0+dfsg/debian/changelog	2015-08-02 18:32:34.000000000 +0200
+++ boost1.58-1.58.0+dfsg/debian/changelog	2015-08-11 11:18:48.000000000 +0200
@@ -1,3 +1,11 @@
+boost1.58 (1.58.0+dfsg-3+x32.1) unreleased; urgency=critical
+
+  * Non-maintainer upload.
+  * debian/patches/no-gcc-m-options.diff: do not append -march=i686 to
+    CFLAGS unconditionally - fixes FTBFS on x32 (Closes: #794622)
+
+ -- Thorsten Glaser <t.glaser at tarent.de>  Tue, 11 Aug 2015 11:17:59 +0200
+
 boost1.58 (1.58.0+dfsg-3) unstable; urgency=medium
 
   * Upload to unstable.
diff -Nru boost1.58-1.58.0+dfsg/debian/patches/no-gcc-m-options.diff boost1.58-1.58.0+dfsg/debian/patches/no-gcc-m-options.diff
--- boost1.58-1.58.0+dfsg/debian/patches/no-gcc-m-options.diff	2015-07-21 01:02:46.000000000 +0200
+++ boost1.58-1.58.0+dfsg/debian/patches/no-gcc-m-options.diff	2015-08-11 11:17:38.000000000 +0200
@@ -21,6 +21,15 @@
              # For darwin, the model can be 32_64. darwin.jam will handle that
              # on its own.
          }
+@@ -1073,7 +1063,7 @@ local rule cpu-flags ( toolset variable
+ # x86 and compatible
+ # The 'native' option appeared in gcc 4.2 so we cannot safely use it as default.
+ # Use i686 instead for 32-bit.
+-toolset.flags gcc OPTIONS <architecture>x86/<address-model>32/<instruction-set> : -march=i686 ;
++toolset.flags gcc OPTIONS <architecture>x86/<address-model>32/<instruction-set> :  ;
+ cpu-flags gcc OPTIONS : x86 : native : -march=native ;
+ cpu-flags gcc OPTIONS : x86 : i486 : -march=i486 ;
+ cpu-flags gcc OPTIONS : x86 : i586 : -march=i586 ;
 Index: b/tools/build/src/tools/pathscale.jam
 ===================================================================
 --- a/tools/build/src/tools/pathscale.jam


More information about the pkg-boost-devel mailing list