|
@@ -77,6 +77,276 @@ index 3c9e0ae..034ab2b 100644
|
|
|
+liblibos {
|
|
|
+ GLIBC_2.12
|
|
|
+}
|
|
|
+diff --git a/LibOS/glibc-2.17/configure b/LibOS/glibc-2.17/configure
|
|
|
+index 8799b7d..22e4c2c 100755
|
|
|
+--- a/LibOS/glibc-2.17/configure
|
|
|
++++ b/LibOS/glibc-2.17/configure
|
|
|
+@@ -636,7 +636,8 @@ SED
|
|
|
+ MAKEINFO
|
|
|
+ MSGFMT
|
|
|
+ MAKE
|
|
|
+-LD
|
|
|
++LD_GOLD
|
|
|
++LD_BFD
|
|
|
+ AS
|
|
|
+ MIG
|
|
|
+ OBJCOPY
|
|
|
+@@ -4792,17 +4793,22 @@ if test $ac_verc_fail = yes; then
|
|
|
+ AS=: critic_missing="$critic_missing as"
|
|
|
+ fi
|
|
|
+
|
|
|
+-for ac_prog in $LD
|
|
|
++LD_BFD=
|
|
|
++LD_GOLD=
|
|
|
++ld_is_gold="`$LD --version | sed -n 's/^GNU \(gold\).*$/\1/p'`"
|
|
|
++if test -z "$ld_is_gold"; then
|
|
|
++ LD_BFD=$LD
|
|
|
++ for ac_prog in $LD_BFD
|
|
|
+ do
|
|
|
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
|
|
|
+ set dummy $ac_prog; ac_word=$2
|
|
|
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
|
|
+ $as_echo_n "checking for $ac_word... " >&6; }
|
|
|
+-if ${ac_cv_prog_LD+:} false; then :
|
|
|
++if ${ac_cv_prog_LD_BFD+:} false; then :
|
|
|
+ $as_echo_n "(cached) " >&6
|
|
|
+ else
|
|
|
+- if test -n "$LD"; then
|
|
|
+- ac_cv_prog_LD="$LD" # Let the user override the test.
|
|
|
++ if test -n "$LD_BFD"; then
|
|
|
++ ac_cv_prog_LD_BFD="$LD_BFD" # Let the user override the test.
|
|
|
+ else
|
|
|
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
|
|
+ for as_dir in $PATH
|
|
|
+@@ -4811,7 +4817,7 @@ do
|
|
|
+ test -z "$as_dir" && as_dir=.
|
|
|
+ for ac_exec_ext in '' $ac_executable_extensions; do
|
|
|
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
|
|
+- ac_cv_prog_LD="$ac_prog"
|
|
|
++ ac_cv_prog_LD_BFD="$ac_prog"
|
|
|
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
|
|
+ break 2
|
|
|
+ fi
|
|
|
+@@ -4821,26 +4827,26 @@ IFS=$as_save_IFS
|
|
|
+
|
|
|
+ fi
|
|
|
+ fi
|
|
|
+-LD=$ac_cv_prog_LD
|
|
|
+-if test -n "$LD"; then
|
|
|
+- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
|
|
|
+-$as_echo "$LD" >&6; }
|
|
|
++LD_BFD=$ac_cv_prog_LD_BFD
|
|
|
++if test -n "$LD_BFD"; then
|
|
|
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD_BFD" >&5
|
|
|
++$as_echo "$LD_BFD" >&6; }
|
|
|
+ else
|
|
|
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
|
|
+ $as_echo "no" >&6; }
|
|
|
+ fi
|
|
|
+
|
|
|
+
|
|
|
+- test -n "$LD" && break
|
|
|
++ test -n "$LD_BFD" && break
|
|
|
+ done
|
|
|
+
|
|
|
+-if test -z "$LD"; then
|
|
|
++if test -z "$LD_BFD"; then
|
|
|
+ ac_verc_fail=yes
|
|
|
+ else
|
|
|
+ # Found it, now check the version.
|
|
|
+- { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of $LD" >&5
|
|
|
+-$as_echo_n "checking version of $LD... " >&6; }
|
|
|
+- ac_prog_version=`$LD --version 2>&1 | sed -n 's/^.*GNU ld.* \([0-9][0-9]*\.[0-9.]*\).*$/\1/p'`
|
|
|
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of $LD_BFD" >&5
|
|
|
++$as_echo_n "checking version of $LD_BFD... " >&6; }
|
|
|
++ ac_prog_version=`$LD_BFD --version 2>&1 | sed -n 's/^.*GNU ld.* \([0-9][0-9]*\.[0-9.]*\).*$/\1/p'`
|
|
|
+ case $ac_prog_version in
|
|
|
+ '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
|
|
|
+ 2.1[0-9][0-9]*|2.[2-9][0-9]*|[3-9].*|[1-9][0-9]*)
|
|
|
+@@ -4852,9 +4858,80 @@ $as_echo_n "checking version of $LD... " >&6; }
|
|
|
+ $as_echo "$ac_prog_version" >&6; }
|
|
|
+ fi
|
|
|
+ if test $ac_verc_fail = yes; then
|
|
|
+- LD=: critic_missing="$critic_missing ld"
|
|
|
++ LD_BFD=:
|
|
|
+ fi
|
|
|
+
|
|
|
++else
|
|
|
++# Accept gold 1.11 or higher.
|
|
|
++ LD_GOLD=$LD
|
|
|
++ for ac_prog in $LD_GOLD
|
|
|
++do
|
|
|
++ # Extract the first word of "$ac_prog", so it can be a program name with args.
|
|
|
++set dummy $ac_prog; ac_word=$2
|
|
|
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
|
|
++$as_echo_n "checking for $ac_word... " >&6; }
|
|
|
++if ${ac_cv_prog_LD_GOLD+:} false; then :
|
|
|
++ $as_echo_n "(cached) " >&6
|
|
|
++else
|
|
|
++ if test -n "$LD_GOLD"; then
|
|
|
++ ac_cv_prog_LD_GOLD="$LD_GOLD" # Let the user override the test.
|
|
|
++else
|
|
|
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
|
|
++for as_dir in $PATH
|
|
|
++do
|
|
|
++ IFS=$as_save_IFS
|
|
|
++ test -z "$as_dir" && as_dir=.
|
|
|
++ for ac_exec_ext in '' $ac_executable_extensions; do
|
|
|
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
|
|
++ ac_cv_prog_LD_GOLD="$ac_prog"
|
|
|
++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
|
|
++ break 2
|
|
|
++ fi
|
|
|
++done
|
|
|
++ done
|
|
|
++IFS=$as_save_IFS
|
|
|
++
|
|
|
++fi
|
|
|
++fi
|
|
|
++LD_GOLD=$ac_cv_prog_LD_GOLD
|
|
|
++if test -n "$LD_GOLD"; then
|
|
|
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD_GOLD" >&5
|
|
|
++$as_echo "$LD_GOLD" >&6; }
|
|
|
++else
|
|
|
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
|
|
++$as_echo "no" >&6; }
|
|
|
++fi
|
|
|
++
|
|
|
++
|
|
|
++ test -n "$LD_GOLD" && break
|
|
|
++done
|
|
|
++
|
|
|
++if test -z "$LD_GOLD"; then
|
|
|
++ ac_verc_fail=yes
|
|
|
++else
|
|
|
++ # Found it, now check the version.
|
|
|
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of $LD_GOLD" >&5
|
|
|
++$as_echo_n "checking version of $LD_GOLD... " >&6; }
|
|
|
++ ac_prog_version=`$LD_GOLD --version 2>&1 | sed -n 's/^.*GNU gold.* \([0-9][0-9]*\.[0-9.]*\).*$/\1/p'`
|
|
|
++ case $ac_prog_version in
|
|
|
++ '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
|
|
|
++ 1.1[1-9]*|1.[2-9][0-9]*|1.1[0-9][0-9]*|[2-9].*|[1-9][0-9]*)
|
|
|
++ ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
|
|
|
++ *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
|
|
|
++
|
|
|
++ esac
|
|
|
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_prog_version" >&5
|
|
|
++$as_echo "$ac_prog_version" >&6; }
|
|
|
++fi
|
|
|
++if test $ac_verc_fail = yes; then
|
|
|
++ LD_GOLD=:
|
|
|
++fi
|
|
|
++
|
|
|
++fi
|
|
|
++# Neither ld nor gold are new enough.
|
|
|
++if test -z "$LD_BFD" && test -z "$LD_GOLD"; then
|
|
|
++ critic_missing="$critic_missing ld"
|
|
|
++fi
|
|
|
+
|
|
|
+ # These programs are version sensitive.
|
|
|
+
|
|
|
+@@ -6670,6 +6747,16 @@ $as_echo "$libc_cv_use_default_link" >&6; }
|
|
|
+ use_default_link=$libc_cv_use_default_link
|
|
|
+ fi
|
|
|
+
|
|
|
++# The gold linker has no builtin default linker script,
|
|
|
++# and the fallback of editing the builtin linker
|
|
|
++# script is not available. Therefore if use_default_link
|
|
|
++# is `no' then we can't use gold. This check is independent
|
|
|
++# of gold's version and is used to sanity check that the
|
|
|
++# linker continues to produce a useful shared link.
|
|
|
++if test "$ld_is_gold" && test "$use_default_link" = "no"; then
|
|
|
++ as_fn_error $? "$LD did not generate a useful shared link. Try using GNU ld.bfd?" "$LINENO" 5
|
|
|
++fi
|
|
|
++
|
|
|
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker output format" >&5
|
|
|
+ $as_echo_n "checking linker output format... " >&6; }
|
|
|
+ if ${libc_cv_output_format+:} false; then :
|
|
|
+@@ -6688,6 +6775,17 @@ fi
|
|
|
+ $as_echo "$libc_cv_output_format" >&6; }
|
|
|
+
|
|
|
+
|
|
|
++# The gold linker has no builtin default linker script,
|
|
|
++# and the fallback of parsing the builtin linker
|
|
|
++# script to determine the target is not available.
|
|
|
++# Therefore if libc_cv_output_format is `unknown' then
|
|
|
++# we can't use gold. This check is independent of gold's
|
|
|
++# version and is used to sanity check that the linker
|
|
|
++# continues to support --print-output-format.
|
|
|
++if test "$ld_is_gold" && test "$libc_cv_output_format" = "unknown"; then
|
|
|
++ as_fn_error $? "$LD did not support --print-output-format. Try using GNU ld.bfd?" "$LINENO" 5
|
|
|
++fi
|
|
|
++
|
|
|
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fno-toplevel-reorder -fno-section-anchors" >&5
|
|
|
+ $as_echo_n "checking for -fno-toplevel-reorder -fno-section-anchors... " >&6; }
|
|
|
+ if ${libc_cv_fno_toplevel_reorder+:} false; then :
|
|
|
+diff --git a/LibOS/glibc-2.17/configure.in b/LibOS/glibc-2.17/configure.in
|
|
|
+index d369382..38ff3cd 100644
|
|
|
+--- a/LibOS/glibc-2.17/configure.in
|
|
|
++++ b/LibOS/glibc-2.17/configure.in
|
|
|
+@@ -924,9 +924,25 @@ AC_SUBST(MIG)dnl Needed by sysdeps/mach/configure.in
|
|
|
+ AC_CHECK_PROG_VER(AS, $AS, --version,
|
|
|
+ [GNU assembler.* \([0-9]*\.[0-9.]*\)],
|
|
|
+ [2.1[0-9][0-9]*|2.[2-9][0-9]*|[3-9].*|[1-9][0-9]*], AS=: critic_missing="$critic_missing as")
|
|
|
+-AC_CHECK_PROG_VER(LD, $LD, --version,
|
|
|
++LD_BFD=
|
|
|
++LD_GOLD=
|
|
|
++ld_is_gold="`$LD --version | sed -n 's/^GNU \(gold\).*$/\1/p'`"
|
|
|
++if test -z "$ld_is_gold"; then
|
|
|
++ LD_BFD=$LD
|
|
|
++ AC_CHECK_PROG_VER(LD_BFD, $LD_BFD, --version,
|
|
|
+ [GNU ld.* \([0-9][0-9]*\.[0-9.]*\)],
|
|
|
+- [2.1[0-9][0-9]*|2.[2-9][0-9]*|[3-9].*|[1-9][0-9]*], LD=: critic_missing="$critic_missing ld")
|
|
|
++ [2.1[0-9][0-9]*|2.[2-9][0-9]*|[3-9].*|[1-9][0-9]*],LD_BFD=:)
|
|
|
++else
|
|
|
++# Accept gold 1.11 or higher.
|
|
|
++ LD_GOLD=$LD
|
|
|
++ AC_CHECK_PROG_VER(LD_GOLD, $LD_GOLD, --version,
|
|
|
++ [GNU gold.* \([0-9][0-9]*\.[0-9.]*\)],
|
|
|
++ [1.1[1-9]*|1.[2-9][0-9]*|1.1[0-9][0-9]*|[2-9].*|[1-9][0-9]*],LD_GOLD=:)
|
|
|
++fi
|
|
|
++# Neither ld nor gold are new enough.
|
|
|
++if test -z "$LD_BFD" && test -z "$LD_GOLD"; then
|
|
|
++ critic_missing="$critic_missing ld"
|
|
|
++fi
|
|
|
+
|
|
|
+ # These programs are version sensitive.
|
|
|
+ AC_CHECK_TOOL_PREFIX
|
|
|
+@@ -1635,6 +1651,16 @@ $ac_try"
|
|
|
+ use_default_link=$libc_cv_use_default_link
|
|
|
+ fi
|
|
|
+
|
|
|
++# The gold linker has no builtin default linker script,
|
|
|
++# and the fallback of editing the builtin linker
|
|
|
++# script is not available. Therefore if use_default_link
|
|
|
++# is `no' then we can't use gold. This check is independent
|
|
|
++# of gold's version and is used to sanity check that the
|
|
|
++# linker continues to produce a useful shared link.
|
|
|
++if test "$ld_is_gold" && test "$use_default_link" = "no"; then
|
|
|
++ AC_MSG_ERROR([$LD did not generate a useful shared link. Try using GNU ld.bfd?])
|
|
|
++fi
|
|
|
++
|
|
|
+ AC_CACHE_CHECK(linker output format, libc_cv_output_format, [dnl
|
|
|
+ if libc_cv_output_format=`
|
|
|
+ ${CC-cc} -nostartfiles -nostdlib -Wl,--print-output-format 2>&AS_MESSAGE_LOG_FD`
|
|
|
+@@ -1646,6 +1672,17 @@ fi
|
|
|
+ test -n "$libc_cv_output_format" || libc_cv_output_format=unknown])
|
|
|
+ AC_SUBST(libc_cv_output_format)
|
|
|
+
|
|
|
++# The gold linker has no builtin default linker script,
|
|
|
++# and the fallback of parsing the builtin linker
|
|
|
++# script to determine the target is not available.
|
|
|
++# Therefore if libc_cv_output_format is `unknown' then
|
|
|
++# we can't use gold. This check is independent of gold's
|
|
|
++# version and is used to sanity check that the linker
|
|
|
++# continues to support --print-output-format.
|
|
|
++if test "$ld_is_gold" && test "$libc_cv_output_format" = "unknown"; then
|
|
|
++ AC_MSG_ERROR([$LD did not support --print-output-format. Try using GNU ld.bfd?])
|
|
|
++fi
|
|
|
++
|
|
|
+ AC_CACHE_CHECK(for -fno-toplevel-reorder -fno-section-anchors, libc_cv_fno_toplevel_reorder, [dnl
|
|
|
+ cat > conftest.c <<EOF
|
|
|
+ int foo;
|
|
|
diff --git a/LibOS/glibc-2.17/dlfcn/Versions b/LibOS/glibc-2.17/dlfcn/Versions
|
|
|
index 97902f0..c1874c1 100644
|
|
|
--- a/LibOS/glibc-2.17/dlfcn/Versions
|