diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2011-11-15 17:54:41 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2011-11-15 17:54:41 +0200 |
commit | ec41632b536fbab63ce732a2439b38ae1c32b095 (patch) | |
tree | ea35808e934761d74711a9d0c0cb4e9150c07985 /build/cxx/gnu/configure | |
parent | dc62e900fb739b41b0f5e5ea028dadb0b86e72a7 (diff) |
Add support for building MinWG shared libraries with GCC
Diffstat (limited to 'build/cxx/gnu/configure')
-rwxr-xr-x | build/cxx/gnu/configure | 33 |
1 files changed, 29 insertions, 4 deletions
diff --git a/build/cxx/gnu/configure b/build/cxx/gnu/configure index bda4bdb..7e5820e 100755 --- a/build/cxx/gnu/configure +++ b/build/cxx/gnu/configure @@ -31,10 +31,30 @@ $echo cxx_gnu=`read_path --command g++` # Pass cxx_extra_options and cxx_ld_extra_options since those -# can affect the search paths (e.g., -m32). +# can affect the search paths (e.g., -m32) and target. # cxx_gnu_libraries=`$cxx_gnu $3 $4 -print-search-dirs | sed -e 's/libraries: =//p' -e d` +cxx_gnu_target=`$cxx_gnu $3 $4 -dumpmachine` +cxx_gnu_target=`$bld_root/system/config.sub "$cxx_gnu_target"` + +if [ $? != 0 ]; then + $echo "unable to canonicalize target system '$cxx_gnu_target'" + exit 1 +fi + +cxx_gnu_target_cpu=`echo $cxx_gnu_target | cut -f 1 -d -` +cxx_gnu_target_mf=`echo $cxx_gnu_target | cut -f 2 -d -` +cxx_gnu_target_kernel=`echo $cxx_gnu_target | cut -f 3 -d -` +cxx_gnu_target_os=`echo $cxx_gnu_target | cut -f 4 -d -` + +if [ -z "$cxx_gnu_target_os" ]; then + + # Old format: cpu-mf-os + # + cxx_gnu_target_os=$cxx_gnu_target_kernel + cxx_gnu_target_kernel= +fi optimization= @@ -56,6 +76,11 @@ if [ "$2" == "y" ]; then fi -echo "cxx_gnu := $cxx_gnu" > $1 -echo "cxx_gnu_libraries := $cxx_gnu_libraries" >> $1 -echo "cxx_gnu_optimization_options := $optimization" >> $1 +echo "cxx_gnu := $cxx_gnu" > $1 +echo "cxx_gnu_libraries := $cxx_gnu_libraries" >> $1 +echo "cxx_gnu_optimization_options := $optimization" >> $1 +echo "cxx_gnu_target := $cxx_gnu_target" >> $1 +echo "cxx_gnu_target_cpu := $cxx_gnu_target_cpu" >> $1 +echo "cxx_gnu_target_mf := $cxx_gnu_target_mf" >> $1 +echo "cxx_gnu_target_kernel := $cxx_gnu_target_kernel" >> $1 +echo "cxx_gnu_target_os := $cxx_gnu_target_os" >> $1 |