duplicate them into the list of libraries. Someone may want to mix
static and dynamic linking.
Fixes PR#37228, approved by jlam.
jlam says that a better long-term fix would be to ensure that all
the -L specifications come before the -l specifications, instead
of moving all the -l specifications to the end of the command line.
for several years now, since the directories in the -I... and -L...
options usually don't need quoting. But when the -D... option was
processed using the same code, the bug had become visible.
log file in a format that allows copy-and-paste into a shell. Before, it
wasn't possible to see from the log file whether a space was a delimiter
or part of a shell word.
- USE_CROSS_COMPILATION activates it, CROSS_DESTDIR specifies root of
the target filesystem
- derive _CROSS_DESTDIR from CROSS_DESTDIR or MAKEOBJDIR
- buildlink3.mk prefixes the files to symlink with _CROSS_DESTDIR
- compiler/gcc.mk knows about the target prefix (e.g. i386--netbsdelf)
- PKG_DBDIR is prefixed with _CROSS_DESTDIR
- package-install and bin-install are not called with su
- install and strip are redirected to the tool version
- links for the target specific ar, as, ld, nm, objdump, ranlib and
strip are added
- compiler wrapper detect if linking is requested or not
- special command sinks for CPP and CC/CXX add the cross-compile magic:
- modify include dirs to get the target /usr/include
- modify linker dirs and runpath to use target /usr/lib at link time,
but keep correct rpath entries
Supported-by: Google SoC 2007
Basic tests by he@ on Sparc. Review from jlam@.
line is no longer printed by default. To get that behavior back, you can
set the variable WRAPPER_DEBUG to "yes".
This avoids some noise during the build. The old behavior was mostly
useful on Solaris and IRIX, where a -std=c99 or -c99 option had been
added to the compiler's arguments by the wrapper. This caused
diagnostics that were hard to understand, since the user did not specify
these flags and there was no sign that they had been added.
--version-script works are few enough to warrant fixing each one of them
instead. Silenty dropping the flag makes it impossible to detect whether or
not --version-script is supported. Pointed out by joerg@
option. Instead of just merging them, the wrapper fails. Let's see which
packages get broken by that and then fix them.
I've also heard rumours that a plain -L is used as an alias to -nostdlib
in some compilers. This would have been handled wrong up to now, since
it definitely wasn't intended to be merged with the following argument.
-32 does _not_ belong to ABI 32. Instead, the mapping is:
ABI Options
(undef) -o32 -32
32 -n32
64 -64
While here, allowing -OPT:* to pass through to the compiler, since it
will understand it.
This should fix PR 35729.
wrapper_abi variable. This is used in the MIPSpro wrapper to reject any
package that tries to compile a file for the wrong ABI. This is not just
a warning because such a package most likely has more severe problems.
The gcc -Wall option seems to be similar to the MIPSpro -fullwarn
option, so map them.
-xcode=pic13 and -xcode=pic32, as suggested in PR 35555.
This also fixes and old bug where -fPIC (32 bit) had been translated to
-kpic (13 bit), but apparently that doesn't make a big difference in
practice.
transformations can decide whether they happen in a C or a C++ compiler.
Now the wrappers don't depend on the basename of the executed compiler
wrapper anymore.
Fixes PR 35555.