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. Index: mk/wrapper/cmd-sink-cross-cpp =================================================================== RCS file: /cvsroot/pkgsrc/mk/wrapper/cmd-sink-cross-cpp,v retrieving revision 1.1 diff -p -u -r1.1 cmd-sink-cross-cpp --- mk/wrapper/cmd-sink-cross-cpp 2 Aug 2007 18:19:32 -0000 1.1 +++ mk/wrapper/cmd-sink-cross-cpp 23 Apr 2013 13:29:19 -0000 @@ -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 Index: mk/wrapper/cmd-sink-cross-gcc =================================================================== RCS file: /cvsroot/pkgsrc/mk/wrapper/cmd-sink-cross-gcc,v retrieving revision 1.2 diff -p -u -r1.2 cmd-sink-cross-gcc --- mk/wrapper/cmd-sink-cross-gcc 9 Oct 2007 19:19:13 -0000 1.2 +++ mk/wrapper/cmd-sink-cross-gcc 23 Apr 2013 13:29:19 -0000 @@ -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 Index: mk/wrapper/cmd-sink-cross-gxx =================================================================== RCS file: /cvsroot/pkgsrc/mk/wrapper/cmd-sink-cross-gxx,v retrieving revision 1.1 diff -p -u -r1.1 cmd-sink-cross-gxx --- mk/wrapper/cmd-sink-cross-gxx 4 Aug 2011 13:32:05 -0000 1.1 +++ mk/wrapper/cmd-sink-cross-gxx 23 Apr 2013 13:29:19 -0000 @@ -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