Use --sysroot in cpp/gcc/gxx cross-compiler wrappers.

Now that NetBSD supports --sysroot we don't need to mess with the
partial measures of -nostdinc, -isystem, &c.

ok agc
This commit is contained in:
riastradh 2013-05-09 23:35:29 +00:00
parent 2affbc5d5c
commit ed8be66086
3 changed files with 9 additions and 106 deletions

View file

@ -1,4 +1,4 @@
# $NetBSD: cmd-sink-cross-cpp,v 1.1 2007/08/02 18:19:32 joerg Exp $
# $NetBSD: cmd-sink-cross-cpp,v 1.2 2013/05/09 23:35:29 riastradh Exp $
#
# Copyright (c) 2007 Joerg Sonnenberger <joerg@NetBSD.org>.
# All rights reserved.
@ -29,17 +29,8 @@
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
# Don't use standard include path.
arg="-nostdinc"
$debug_log $wrapperlog " (cmd-sink-native-cc) pop: $arg"
. $buildcmd
# Compiler searches for headers in /usr/include, emulate.
arg="-isystem"
$debug_log $wrapperlog " (cmd-sink-native-cc) pop: $arg"
. $buildcmd
arg="@CROSS_DESTDIR@/usr/include"
# Use include files and libraries from the target system image.
arg="--sysroot=@CROSS_DESTDIR@"
$debug_log $wrapperlog " (cmd-sink-native-cc) pop: $arg"
. $buildcmd

View file

@ -1,4 +1,4 @@
# $NetBSD: cmd-sink-cross-gcc,v 1.2 2007/10/09 19:19:13 martti Exp $
# $NetBSD: cmd-sink-cross-gcc,v 1.3 2013/05/09 23:35:29 riastradh Exp $
#
# Copyright (c) 2007 Joerg Sonnenberger <joerg@NetBSD.org>.
# All rights reserved.
@ -29,41 +29,8 @@
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
if [ "${dont_link}" != yes ]; then
# Don't use standard search paths
arg="-Wl,-nostdlib"
$debug_log $wrapperlog " (cmd-sink-native-cc) pop: $arg"
. $buildcmd
# All normal library locations should be checked for
for libdir in /usr/lib @PREFIX@/lib; do
arg="-Wl,-rpath-link,@CROSS_DESTDIR@${libdir}"
$debug_log $wrapperlog " (cmd-sink-native-cc) pop: $arg"
. $buildcmd
done
# Compiler searches for libraries in /usr/lib, emulate.
arg="-L@CROSS_DESTDIR@/usr/lib"
$debug_log $wrapperlog " (cmd-sink-native-cc) pop: $arg"
. $buildcmd
# crt1.o and friends needs to be found as well.
arg="-B@CROSS_DESTDIR@/usr/lib"
$debug_log $wrapperlog " (cmd-sink-native-cc) pop: $arg"
. $buildcmd
fi
# Don't use standard include path.
arg="-nostdinc"
$debug_log $wrapperlog " (cmd-sink-native-cc) pop: $arg"
. $buildcmd
# Compiler searches for headers in /usr/include, emulate.
arg="-isystem"
$debug_log $wrapperlog " (cmd-sink-native-cc) pop: $arg"
. $buildcmd
arg="@CROSS_DESTDIR@/usr/include"
# Use include files and libraries from the target system image.
arg="--sysroot=@CROSS_DESTDIR@"
$debug_log $wrapperlog " (cmd-sink-native-cc) pop: $arg"
. $buildcmd

View file

@ -1,4 +1,4 @@
# $NetBSD: cmd-sink-cross-gxx,v 1.1 2011/08/04 13:32:05 obache Exp $
# $NetBSD: cmd-sink-cross-gxx,v 1.2 2013/05/09 23:35:29 riastradh Exp $
#
# Copyright (c) 2007 Joerg Sonnenberger <joerg@NetBSD.org>.
# All rights reserved.
@ -29,63 +29,8 @@
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
if [ "${dont_link}" != yes ]; then
# Don't use standard search paths
arg="-Wl,-nostdlib"
$debug_log $wrapperlog " (cmd-sink-native-cxx) pop: $arg"
. $buildcmd
# All normal library locations should be checked for
for libdir in /usr/lib @PREFIX@/lib; do
arg="-Wl,-rpath-link,@CROSS_DESTDIR@${libdir}"
$debug_log $wrapperlog " (cmd-sink-native-cxx) pop: $arg"
. $buildcmd
done
# Compiler searches for libraries in /usr/lib, emulate.
arg="-L@CROSS_DESTDIR@/usr/lib"
$debug_log $wrapperlog " (cmd-sink-native-cxx) pop: $arg"
. $buildcmd
# crt1.o and friends needs to be found as well.
arg="-B@CROSS_DESTDIR@/usr/lib"
$debug_log $wrapperlog " (cmd-sink-native-cxx) pop: $arg"
. $buildcmd
fi
# Don't use standard include path.
arg="-nostdinc"
$debug_log $wrapperlog " (cmd-sink-native-cxx) pop: $arg"
. $buildcmd
# Compiler searches for headers in /usr/include, emulate.
arg="-isystem"
$debug_log $wrapperlog " (cmd-sink-native-cxx) pop: $arg"
. $buildcmd
arg="@CROSS_DESTDIR@/usr/include"
$debug_log $wrapperlog " (cmd-sink-native-cxx) pop: $arg"
. $buildcmd
# Don't use standard include path.
arg="-nostdinc++"
$debug_log $wrapperlog " (cmd-sink-native-cxx) pop: $arg"
. $buildcmd
# Compiler searches for headers in /usr/include/g++, emulate.
arg="-isystem"
$debug_log $wrapperlog " (cmd-sink-native-cxx) pop: $arg"
. $buildcmd
arg="@CROSS_DESTDIR@/usr/include/g++"
$debug_log $wrapperlog " (cmd-sink-native-cxx) pop: $arg"
. $buildcmd
arg="-isystem"
$debug_log $wrapperlog " (cmd-sink-native-cxx) pop: $arg"
. $buildcmd
arg="@CROSS_DESTDIR@/usr/include/g++/backward"
# Use include files and libraries from the target system image.
arg="--sysroot=@CROSS_DESTDIR@"
$debug_log $wrapperlog " (cmd-sink-native-cxx) pop: $arg"
. $buildcmd