Fix typo fsqrt -> sqrtf.
[deliverable/binutils-gdb.git] / ld / genscripts.sh
index a4da92d2d0c62d3a4a8bc54ca8daa2d290c32bcb..eb262e7ef6168c8a88fbae12ec47207d451e6ee3 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 # genscripts.sh - generate the ld-emulation-target specific files
-# Copyright 2004, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2004-2016 Free Software Foundation, Inc.
 #
 # This file is part of the Gnu Linker.
 #
@@ -33,8 +33,7 @@
 #          enable_initfini_array \
 #          this_emulation \
 # optional:
-#          tool_dir \
-#          customizer_script
+#          tool_dir
 #
 # Sample usage:
 #
@@ -93,14 +92,9 @@ use_sysroot=$1
 ENABLE_INITFINI_ARRAY=$2
 EMULATION_NAME=$3
 TOOL_LIB=$4
-CUSTOMIZER_SCRIPT=$5
-
-if [ "x${CUSTOMIZER_SCRIPT}" = "x" ] ; then
-  CUSTOMIZER_SCRIPT=${EMULATION_NAME}
-fi
-CUSTOMIZER_SCRIPT="${srcdir}/emulparams/${CUSTOMIZER_SCRIPT}.sh"
 
 # Include the emulation-specific parameters:
+CUSTOMIZER_SCRIPT="${srcdir}/emulparams/${EMULATION_NAME}.sh"
 . ${CUSTOMIZER_SCRIPT}
 
 if test -d ldscripts; then
@@ -160,6 +154,7 @@ append_to_lib_path()
       if [ "x${use_sysroot}" = "xyes" ] ; then
        lib="=${lib}"
       fi
+      skip_lib=no
       if test -n "${LIBPATH_SUFFIX}"; then
        case "${lib}" in
          *${LIBPATH_SUFFIX})
@@ -169,18 +164,27 @@ append_to_lib_path()
              *) lib_path1=${lib_path1}:${lib} ;;
            esac ;;
          *)
-           case :${lib_path1}: in
-             *:${lib}${LIBPATH_SUFFIX}:*) ;;
-             ::) lib_path1=${lib}${LIBPATH_SUFFIX} ;;
-             *) lib_path1=${lib_path1}:${lib}${LIBPATH_SUFFIX} ;;
-           esac ;;
+           if test -n "${LIBPATH_SUFFIX_SKIP}"; then
+             case "${lib}" in
+               *${LIBPATH_SUFFIX_SKIP}) skip_lib=yes ;;
+             esac
+           fi
+           if test "${skip_lib}" = "no"; then
+             case :${lib_path1}: in
+               *:${lib}${LIBPATH_SUFFIX}:*) ;;
+               ::) lib_path1=${lib}${LIBPATH_SUFFIX} ;;
+               *) lib_path1=${lib_path1}:${lib}${LIBPATH_SUFFIX} ;;
+             esac
+           fi ;;
+       esac
+      fi
+      if test "${skip_lib}" = "no"; then
+       case :${lib_path1}:${lib_path2}: in
+         *:${lib}:*) ;;
+         *::) lib_path2=${lib} ;;
+         *) lib_path2=${lib_path2}:${lib} ;;
        esac
       fi
-      case :${lib_path1}:${lib_path2}: in
-       *:${lib}:*) ;;
-       *::) lib_path2=${lib} ;;
-       *) lib_path2=${lib_path2}:${lib} ;;
-      esac
     done
   fi
 }
@@ -403,8 +407,8 @@ if test -n "$GENERATE_AUTO_IMPORT_SCRIPT"; then
   ) | sed -e '/^ *$/d;s/[      ]*$//' > ldscripts/${EMULATION_NAME}.xa
 fi
 
-case " $EMULATION_LIBPATH " in
-    *" ${EMULATION_NAME} "*) COMPILE_IN=true;;
+case "$COMPILE_IN: $EMULATION_LIBPATH " in
+    :*" ${EMULATION_NAME} "*) COMPILE_IN=yes;;
 esac
 
 # PR ld/5652:
This page took 0.037558 seconds and 4 git commands to generate.