From 43c916b6dc5441c273bbefd789f8944f2d8c8070 Mon Sep 17 00:00:00 2001 From: Shiz Date: Sat, 20 Jun 2015 04:10:22 +0200 Subject: fix portability issues in build system This fixes numerous issues where the CBB build system used non-portable constructs. See COPYING.MIDIPIX (9cd0746c) for copyright information. Signed-off-by: Shiz --- configure | 8 ++++---- fixincludes/Makefile.in | 2 +- fixincludes/configure | 2 +- gcc/configure | 4 ++-- libgcc/configure | 5 ++--- libgfortran/configure | 5 ++--- libgomp/configure | 5 ++--- libjava/configure | 5 ++--- libobjc/configure | 5 ++--- libquadmath/configure | 2 +- libssp/configure | 5 ++--- libstdc++-v3/configure | 5 ++--- ltmain.sh | 2 +- 13 files changed, 24 insertions(+), 31 deletions(-) diff --git a/configure b/configure index 301ddc5f9..251635f8c 100755 --- a/configure +++ b/configure @@ -15450,19 +15450,19 @@ fi # Compiler Building Blocks top-level-only variables -sed -i -e 's#@cbb_cflags_for_stage1@#'"$cbb_cflags_for_stage1"'#g' \ +sed -e 's#@cbb_cflags_for_stage1@#'"$cbb_cflags_for_stage1"'#g' \ -e 's#@cbb_cflags_for_stage2@#'"$cbb_cflags_for_stage2"'#g' \ -e 's#@cbb_cflags_for_stage3@#'"$cbb_cflags_for_stage3"'#g' \ -e 's#@cbb_cflags_for_stage4@#'"$cbb_cflags_for_stage4"'#g' \ -e 's#@cbb_cflags_for_stageprofile@#'"$cbb_cflags_for_stageprofile"'#g' \ -e 's#@cbb_cflags_for_stagefeedback@#'"$cbb_cflags_for_stagefeedback"'#g' \ - Makefile || exit 2 + Makefile > Makefile.tmp && mv Makefile.tmp Makefile || exit 2 # Compiler Building Blocks variables -sed -i -e 's#@cbb_xgcc_for_specs@#'"$cbb_xgcc_for_specs"'#g' \ +sed -e 's#@cbb_xgcc_for_specs@#'"$cbb_xgcc_for_specs"'#g' \ -e 's#@cbb_ldflags_for_target@#'"$cbb_ldflags_for_target"'#g' \ -e 's#@cbb_sysroot_for_libgcc@#'"$cbb_sysroot_for_libgcc"'#g' \ -e 's#@cbb_cflags_for_bootstrap@#'"$cbb_cflags_for_bootstrap"'#g' \ - Makefile || exit 2 + Makefile > Makefile.tmp && mv Makefile.tmp Makefile || exit 2 diff --git a/fixincludes/Makefile.in b/fixincludes/Makefile.in index 266c6ee35..458d1b8b8 100644 --- a/fixincludes/Makefile.in +++ b/fixincludes/Makefile.in @@ -11,5 +11,5 @@ fixincl: $(src_dir)/fixincl.c $(CC) -o fixincl $(src_dir)/fixincl.c fixinc.sh: $(src_dir)/fixinc.sh - cp -t . $(src_dir)/fixinc.sh + cp $(src_dir)/fixinc.sh . chmod +x fixinc.sh diff --git a/fixincludes/configure b/fixincludes/configure index 197f4488c..ac3591026 100644 --- a/fixincludes/configure +++ b/fixincludes/configure @@ -3,5 +3,5 @@ src_dir=$(dirname $0) cp $src_dir/Makefile.in Makefile # update makefile -sed -i -e 's#@src_dir@#'$src_dir'#g' Makefile +sed -e 's#@src_dir@#'$src_dir'#g' Makefile > Makefile.tmp && mv Makefile.tmp Makefile diff --git a/gcc/configure b/gcc/configure index 9607d6796..11ff560b9 100755 --- a/gcc/configure +++ b/gcc/configure @@ -27793,8 +27793,8 @@ fi # Compiler Building Blocks variables -sed -i -e 's#@cbb_xgcc_for_specs@#'"$cbb_xgcc_for_specs"'#g' \ +sed -e 's#@cbb_xgcc_for_specs@#'"$cbb_xgcc_for_specs"'#g' \ -e 's#@cbb_ldflags_for_target@#'"$cbb_ldflags_for_target"'#g' \ -e 's#@cbb_sysroot_for_libgcc@#'"$cbb_sysroot_for_libgcc"'#g' \ - Makefile || exit 2 + Makefile > Makefile.tmp && mv Makefile.tmp Makefile || exit 2 diff --git a/libgcc/configure b/libgcc/configure index 70290a2a4..26d3feba4 100644 --- a/libgcc/configure +++ b/libgcc/configure @@ -5118,8 +5118,7 @@ fi # Compiler Building Blocks variables -sed -i -e 's#@cbb_xgcc_for_specs@#'"$cbb_xgcc_for_specs"'#g' \ +sed -e 's#@cbb_xgcc_for_specs@#'"$cbb_xgcc_for_specs"'#g' \ -e 's#@cbb_ldflags_for_target@#'"$cbb_ldflags_for_target"'#g' \ -e 's#@cbb_sysroot_for_libgcc@#'"$cbb_sysroot_for_libgcc"'#g' \ - Makefile || exit 2 - + Makefile > Makefile.tmp && mv Makefile.tmp Makefile || exit 2 diff --git a/libgfortran/configure b/libgfortran/configure index ad0c8aa0c..6da0ea542 100755 --- a/libgfortran/configure +++ b/libgfortran/configure @@ -28964,8 +28964,7 @@ fi # Compiler Building Blocks variables -sed -i -e 's#@cbb_xgcc_for_specs@#'"$cbb_xgcc_for_specs"'#g' \ +sed -e 's#@cbb_xgcc_for_specs@#'"$cbb_xgcc_for_specs"'#g' \ -e 's#@cbb_ldflags_for_target@#'"$cbb_ldflags_for_target"'#g' \ -e 's#@cbb_sysroot_for_libgcc@#'"$cbb_sysroot_for_libgcc"'#g' \ - Makefile || exit 2 - + Makefile > Makefile.tmp && mv Makefile.tmp Makefile || exit 2 diff --git a/libgomp/configure b/libgomp/configure index c72b18b1d..d92668af0 100755 --- a/libgomp/configure +++ b/libgomp/configure @@ -19342,8 +19342,7 @@ fi # Compiler Building Blocks variables -sed -i -e 's#@cbb_xgcc_for_specs@#'"$cbb_xgcc_for_specs"'#g' \ +sed -e 's#@cbb_xgcc_for_specs@#'"$cbb_xgcc_for_specs"'#g' \ -e 's#@cbb_ldflags_for_target@#'"$cbb_ldflags_for_target"'#g' \ -e 's#@cbb_sysroot_for_libgcc@#'"$cbb_sysroot_for_libgcc"'#g' \ - Makefile || exit 2 - + Makefile > Makefile.tmp && mv Makefile.tmp Makefile || exit 2 diff --git a/libjava/configure b/libjava/configure index 9d5c49dfc..611772e42 100755 --- a/libjava/configure +++ b/libjava/configure @@ -28153,8 +28153,7 @@ fi # Compiler Building Blocks variables -sed -i -e 's#@cbb_xgcc_for_specs@#'"$cbb_xgcc_for_specs"'#g' \ +sed -e 's#@cbb_xgcc_for_specs@#'"$cbb_xgcc_for_specs"'#g' \ -e 's#@cbb_ldflags_for_target@#'"$cbb_ldflags_for_target"'#g' \ -e 's#@cbb_sysroot_for_libgcc@#'"$cbb_sysroot_for_libgcc"'#g' \ - Makefile || exit 2 - + Makefile > Makefile.tmp && mv Makefile.tmp Makefile || exit 2 diff --git a/libobjc/configure b/libobjc/configure index 2b86064de..86e07adc0 100755 --- a/libobjc/configure +++ b/libobjc/configure @@ -13769,8 +13769,7 @@ fi # Compiler Building Blocks variables -sed -i -e 's#@cbb_xgcc_for_specs@#'"$cbb_xgcc_for_specs"'#g' \ +sed -e 's#@cbb_xgcc_for_specs@#'"$cbb_xgcc_for_specs"'#g' \ -e 's#@cbb_ldflags_for_target@#'"$cbb_ldflags_for_target"'#g' \ -e 's#@cbb_sysroot_for_libgcc@#'"$cbb_sysroot_for_libgcc"'#g' \ - Makefile || exit 2 - + Makefile > Makefile.tmp && mv Makefile.tmp Makefile || exit 2 diff --git a/libquadmath/configure b/libquadmath/configure index 296707f75..83aabff8e 100755 --- a/libquadmath/configure +++ b/libquadmath/configure @@ -15268,6 +15268,6 @@ fi # when all else fails... case $host_os in midipix | midipix*) - cp -t . ../libstdc++-v3/libtool + cp ../libstdc++-v3/libtool . ;; esac diff --git a/libssp/configure b/libssp/configure index cfad6d0c3..3b62a3b65 100755 --- a/libssp/configure +++ b/libssp/configure @@ -13446,8 +13446,7 @@ fi # Compiler Building Blocks variables -sed -i -e 's#@cbb_xgcc_for_specs@#'"$cbb_xgcc_for_specs"'#g' \ +sed -e 's#@cbb_xgcc_for_specs@#'"$cbb_xgcc_for_specs"'#g' \ -e 's#@cbb_ldflags_for_target@#'"$cbb_ldflags_for_target"'#g' \ -e 's#@cbb_sysroot_for_libgcc@#'"$cbb_sysroot_for_libgcc"'#g' \ - Makefile || exit 2 - + Makefile > Makefile.tmp && mv Makefile.tmp Makefile || exit 2 diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index 18d540b74..3ec78fbee 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -68921,8 +68921,7 @@ fi # Compiler Building Blocks variables -sed -i -e 's#@cbb_xgcc_for_specs@#'"$cbb_xgcc_for_specs"'#g' \ +sed -e 's#@cbb_xgcc_for_specs@#'"$cbb_xgcc_for_specs"'#g' \ -e 's#@cbb_ldflags_for_target@#'"$cbb_ldflags_for_target"'#g' \ -e 's#@cbb_sysroot_for_libgcc@#'"$cbb_sysroot_for_libgcc"'#g' \ - Makefile || exit 2 - + Makefile > Makefile.tmp && mv Makefile.tmp Makefile || exit 2 diff --git a/ltmain.sh b/ltmain.sh index 744264797..3ec69fa2e 100644 --- a/ltmain.sh +++ b/ltmain.sh @@ -2346,7 +2346,7 @@ func_mode_install () head -n$imp_lines "$implib_def_name" > "$implib_exp_def_name" "$host"-dlltool -d "$implib_exp_def_name" -D "$dso_name" -l "$implib_name" - cp -t "$destdir" "$implib_name" + cp "$implib_name" "$destdir" ;; esac -- cgit v1.2.3