]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
authorokuji <okuji@localhost>
Fri, 27 Dec 2002 14:14:06 +0000 (14:14 +0000)
committerokuji <okuji@localhost>
Fri, 27 Dec 2002 14:14:06 +0000 (14:14 +0000)
* configure.ac: Check ld.
Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
respectively, before checking endianness and sizes.

* Makefile.in (LD): New variable.

ChangeLog
Makefile.in
NEWS
configure
configure.ac

index 2ab0deefe2e40fe4e50a02f638bbb2e6b2a7e268..7fd12f9639482205118d56dc7f4541fe72ed7e04 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
+
+       * configure.ac: Check ld.
+       Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
+       respectively, before checking endianness and sizes.
+
+       * Makefile.in (LD): New variable.
+       
 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
 
        * Makefile.in (BUILD_CC): CC -> BUILD_CC.
index 06ff43eed031c1d9bfd05e6cfd095c2df267329d..81eb3db4e2fcfdd8213ebded708587404dc0ee71 100644 (file)
@@ -65,6 +65,7 @@ BUILD_CPPFLAGS = -I. -Iinclude -I$(srcdir)/include -Wall -W \
 OBJCOPY = @OBJCOPY@
 STRIP = @STRIP@
 NM = @NM@
+LD = @LD@
 RUBY = @RUBY@
 
 ### General variables.
diff --git a/NEWS b/NEWS
index 65ce9a0dceeff107bfeb9a548863991e9559251e..032e2dd75f12354864b3e7d67683fde0b5f9005e 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,7 @@
+New in 0.7:
+
+* Problems in cross-compiling PUPA are fixed.
+
 New in 0.6 - 2002-12-27, Yoshinori K. Okuji:
 
 * The chainloader and the FAT filesystem are modularized.
index 45a328b60dfba3b38d0384ea26b51ab53c0acdeb..9c619bbc815718a9150a7d2188576dc91c627e9b 100644 (file)
--- a/configure
+++ b/configure
@@ -3179,6 +3179,85 @@ else
   NM="$ac_cv_prog_NM"
 fi
 
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ld; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_LD+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$LD"; then
+  ac_cv_prog_LD="$LD" # 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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_LD="${ac_tool_prefix}ld"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+LD=$ac_cv_prog_LD
+if test -n "$LD"; then
+  echo "$as_me:$LINENO: result: $LD" >&5
+echo "${ECHO_T}$LD" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_LD"; then
+  ac_ct_LD=$LD
+  # Extract the first word of "ld", so it can be a program name with args.
+set dummy ld; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_LD"; then
+  ac_cv_prog_ac_ct_LD="$ac_ct_LD" # 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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_LD="ld"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_LD=$ac_cv_prog_ac_ct_LD
+if test -n "$ac_ct_LD"; then
+  echo "$as_me:$LINENO: result: $ac_ct_LD" >&5
+echo "${ECHO_T}$ac_ct_LD" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  LD=$ac_ct_LD
+else
+  LD="$ac_cv_prog_LD"
+fi
+
 
 # This is not a "must".
 # Extract the first word of "ruby", so it can be a program name with args.
@@ -3272,8 +3351,12 @@ echo "$as_me: error: none of gcc, egcs and cc is found. set BUILD_CC manually."
 fi
 
 # Test the C compiler for the build environment.
-pupa_tmp_CC="$CC"
+tmp_CC="$CC"
+tmp_CFLAGS="$CFLAGS"
+tmp_CPPFLAGS="$CPPFLAGS"
 CC="$BUILD_CC"
+CFLAGS="$BUILD_CFLAGS"
+CPPFLAGS="$BUILD_CPPFLAGS"
 echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
 echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
 if test "${ac_cv_c_bigendian+set}" = set; then
@@ -4598,7 +4681,9 @@ cat >>confdefs.h <<_ACEOF
 _ACEOF
 
 
-CC="$pupa_tmp_CC"
+CC="$tmp_CC"
+CFLAGS="$tmp_CFLAGS"
+CPPFLAGS="$tmp_CPPFLAGS"
 
 # Output files.
 ac_config_links="$ac_config_links include/pupa/cpu:include/pupa/$host_cpu include/pupa/machine:include/pupa/$host_cpu/$host_vendor"
@@ -5193,6 +5278,8 @@ s,@STRIP@,$STRIP,;t t
 s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
 s,@NM@,$NM,;t t
 s,@ac_ct_NM@,$ac_ct_NM,;t t
+s,@LD@,$LD,;t t
+s,@ac_ct_LD@,$ac_ct_LD,;t t
 s,@RUBY@,$RUBY,;t t
 s,@BUILD_CC@,$BUILD_CC,;t t
 s,@CPP@,$CPP,;t t
index 524fc14207d9434b0c720cb65542d75cd6ad4a40..6e63db47c9e574b292c61ef4ae135323a95eadc1 100644 (file)
@@ -95,6 +95,7 @@ AC_CHECK_TOOL(OBJCOPY, objcopy)
 pupa_PROG_OBJCOPY_ABSOLUTE
 AC_CHECK_TOOL(STRIP, strip)
 AC_CHECK_TOOL(NM, nm)
+AC_CHECK_TOOL(LD, ld)
 
 # This is not a "must".
 AC_PATH_PROG(RUBY, ruby)
@@ -109,12 +110,18 @@ else
 fi
 
 # Test the C compiler for the build environment.
-pupa_tmp_CC="$CC"
+tmp_CC="$CC"
+tmp_CFLAGS="$CFLAGS"
+tmp_CPPFLAGS="$CPPFLAGS"
 CC="$BUILD_CC"
+CFLAGS="$BUILD_CFLAGS"
+CPPFLAGS="$BUILD_CPPFLAGS"
 AC_C_BIGENDIAN
 AC_CHECK_SIZEOF(void *)
 AC_CHECK_SIZEOF(long)
-CC="$pupa_tmp_CC"
+CC="$tmp_CC"
+CFLAGS="$tmp_CFLAGS"
+CPPFLAGS="$tmp_CPPFLAGS"
 
 # Output files.
 AC_CONFIG_LINKS([include/pupa/cpu:include/pupa/$host_cpu