[MacPorts] #34233: apple-gcc42 doesn't honor -isysroot correctly
MacPorts
noreply at macports.org
Thu May 17 03:31:01 PDT 2012
#34233: apple-gcc42 doesn't honor -isysroot correctly
-----------------------------------+----------------------------------------
Reporter: jeremyhu@… | Owner: royliu@…
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.0.4
Keywords: | Port: apple-gcc42
-----------------------------------+----------------------------------------
Comment(by jeremyhu@…):
r93187 has my workaround, since your patch actually made things worse. I
don't think you understand how -isysroot works. The sysroot is appended
to certain include paths (but not all of them). -isysroot should NOT be
appended to the *compiler's* include path because it needs to be found in
$prefix (we assume MacPorts doesn't exist in an $SDK). Setting
p->add_sysroot to false will cause the sysroot to NOT be appended, so that
is what we want to do.
Your change just rewrote the include path to be /usr/include ...
My hack works by forcing that predicate to false based on checking for the
"apple-gcc42" substring that will appear in the compiler's include
directory, but the real fix is to make sure p->add_sysroot gets set to
false for that entry.
--
Ticket URL: <https://trac.macports.org/ticket/34233#comment:14>
MacPorts <http://www.macports.org/>
Ports system for Mac OS
More information about the macports-tickets
mailing list