NetBSD-Bugs archive

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

re: port-i386/45374: -current tools using machine-local CPU CFLAGS overriding mk.conf

The following reply was made to PR port-i386/45374; it has been noted by GNATS.

From: matthew green <>
Subject: re: port-i386/45374: -current tools using machine-local CPU CFLAGS 
overriding mk.conf
Date: Sun, 18 Sep 2011 18:17:07 +1000

 > I'm not really sure why GMP is now needed as part of /usr/tools, but I
 GCC >= 4.2 require GMP.
 > noticed that while other tools will by default ignore mk.conf
 > CFLAGS/CCOPTS and ensure to use x86 agnostic CFLAGS (so that they're
 > portable among x86 systems), GMP will use its own heuristics and build
 > using CFLAGS optimized for the current machine.
 > While this could potentially increase the speed of system builds, it is
 > new behaviour, and /usr/tools can no longer be shared among x86
 > variants of a network.  I tried setting conservative CFLAGS
 > via /etc/mk.conf but those also are ignored by GMP.
 > >How-To-Repeat:
 > Build /usr/tools using on a build host; attempt to use them
 > from other x86 variants across a network.  I.e. a mix of 32-bit-mode
 > core2, p4 and other i686.
 while i'd like to fix this problem, i don't think that we ever have
 tried to provide this level of compatibility for the tooldir.  our
 src/tools are designed to run on the machine you build netbsd, not on
 some other system.
 > >Fix:
 > Currently unknown; tell GMP at configuration to not do heuristics,
 > or give it conservative x86 CFLAGS to use?  Or observe mk.conf provided
 > CFLAGS instead of ignoring them when building tools?  So that
 > CFLAGS+='-march=i686 -O2' would work for /usr/tools/ ...
 can someone have a look at what happens here?  this is also the same
 basic issue that people had trying to build on some OSX versions,
 where GMP and MPFR would choose different defaults.  clearly there's
 some extra we need to do for GMP -- but i don't know it well enough
 to really fix it, and won't have a lot of time in the near future.
 FWIW, setting "ABI" when configuring GMP can alter the settings it
 chosses, so maybe picking a valid LCD here is what we need.

Home | Main Index | Thread Index | Old Index