]> git.proxmox.com Git - grub2.git/commitdiff
TARGET_IMG_LDFLAGS_AC now always expects a number appended to it. Fixed
authorGrégoire Sutre <gregoire.sutre@gmail.com>
Sun, 18 Apr 2010 17:57:50 +0000 (19:57 +0200)
committerGrégoire Sutre <gregoire.sutre@gmail.com>
Sun, 18 Apr 2010 17:57:50 +0000 (19:57 +0200)
grub_prefix in grub-mkconfig for NetBSD and OpenBSD.

ChangeLog
acinclude.m4
configure.ac
util/grub-mkconfig.in

index 6f39713a21acf6829a1acaded04b6fa92f0bf6bb..796d5614db0ce261ecf0457349da25a9d5b0635a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2010-04-18  Grégoire Sutre  <gregoire.sutre@gmail.com>
+
+       * util/grub-mkconfig.in: Corrected two == equality tests.
+       Set grub_prefix as in grub-install for NetBSD and OpenBSD.
+       * configure.ac: All definitions and uses of TARGET_IMG_LDFLAGS_AC now
+       expect a number appended to it.
+       * acinclude.m4 (grub_PROG_OBJCOPY_ABSOLUTE): ${TARGET_IMG_LDFLAGS_AC}
+       expects a number appended to it.
+
 2010-04-18  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * po/POTFILES: Renamed multiboot_loader.c to multiboot.c
index 692404e202c5768a0a52566d48424c32d5d74f02..72483b5d0c390fa5035ba327cca7545c40a8b089 100644 (file)
@@ -93,7 +93,7 @@ else
 fi
 grub_cv_prog_objcopy_absolute=yes
 for link_addr in 0x2000 0x8000 0x7C00; do
-  if AC_TRY_COMMAND([${CC-cc} ${CFLAGS} -nostdlib ${TARGET_IMG_LDFLAGS_AC} -Wl,-Ttext -Wl,$link_addr conftest.o -o conftest.exec]); then :
+  if AC_TRY_COMMAND([${CC-cc} ${CFLAGS} -nostdlib ${TARGET_IMG_LDFLAGS_AC}$link_addr conftest.o -o conftest.exec]); then :
   else
     AC_MSG_ERROR([${CC-cc} cannot link at address $link_addr])
   fi
index 3116d65841d2155dd43f6069b86f1b1cac0b30dc..5b959fb01e8306980887a0d75010b7f60787ee3a 100644 (file)
@@ -360,7 +360,7 @@ else
 if test -f "${srcdir}/conf/${target_cpu}-${platform}-${host_os}-img-ld.sc"; then
   TARGET_IMG_LDSCRIPT='$(top_srcdir)'"/conf/${target_cpu}-${platform}-${host_os}-img-ld.sc"
   TARGET_IMG_LDFLAGS="-Wl,-T${TARGET_IMG_LDSCRIPT}  -Wl,-Ttext,"
-  TARGET_IMG_LDFLAGS_AC="-Wl,-T${srcdir}/conf/${target_cpu}-${platform}-${host_os}-img-ld.sc"
+  TARGET_IMG_LDFLAGS_AC="-Wl,-T${srcdir}/conf/${target_cpu}-${platform}-${host_os}-img-ld.sc  -Wl,-Ttext,"
 else
   TARGET_IMG_LDSCRIPT=
   TARGET_IMG_LDFLAGS='-Wl,-N  -Wl,-Ttext,'
@@ -515,7 +515,7 @@ grub_PROG_LD_BUILD_ID_NONE
 if test "x$target_cpu" = xi386; then
   if test ! -z "$TARGET_IMG_LDSCRIPT"; then
     # Check symbols provided by linker script.
-    CFLAGS="$TARGET_CFLAGS -nostdlib $TARGET_IMG_LDFLAGS_AC -Wl,-Ttext,8000,--defsym,___main=0x8100"
+    CFLAGS="$TARGET_CFLAGS -nostdlib ${TARGET_IMG_LDFLAGS_AC}8000,--defsym,___main=0x8100"
   fi
   if test "x$TARGET_APPLE_CC" != x1 ; then
     grub_CHECK_BSS_START_SYMBOL
index b98bbc993e6d5ea92eac585a9c8c12bc79b04d3c..4e476ae066d02449b621c7c0f949e277b8028d18 100644 (file)
@@ -24,10 +24,10 @@ sbindir=@sbindir@
 libdir=@libdir@
 sysconfdir=@sysconfdir@
 package_version=@PACKAGE_VERSION@
+host_os=@host_os@
 datarootdir=@datarootdir@
 datadir=@datadir@
 pkgdatadir=${datadir}/`echo @PACKAGE_TARNAME@ | sed "${transform}"`
-grub_prefix=`echo /boot/grub | sed ${transform}`
 grub_cfg=""
 grub_mkconfig_dir=${sysconfdir}/grub.d
 
@@ -75,6 +75,18 @@ done
 
 . ${libdir}/grub/grub-mkconfig_lib
 
+case "$host_os" in
+netbsd* | openbsd*)
+    # Because /boot is used for the boot block in NetBSD and OpenBSD, use /grub
+    # instead of /boot/grub.
+    grub_prefix=`echo /grub | sed ${transform}`
+    ;;
+*)
+    # Use /boot/grub by default.
+    grub_prefix=`echo /boot/grub | sed ${transform}`
+    ;;
+esac
+
 if [ "x$EUID" = "x" ] ; then
   EUID=`id -u`
 fi
@@ -141,13 +153,13 @@ if [ "x${GRUB_TERMINAL}" != "x" ] ; then
 fi
 
 termoutdefault=0
-if [ "x${GRUB_TERMINAL_OUTPUT}" == x ]; then
+if [ "x${GRUB_TERMINAL_OUTPUT}" = "x" ]; then
     GRUB_TERMINAL_OUTPUT=gfxterm;
     termoutdefault=1;
 fi
 
 for x in ${GRUB_TERMINAL_OUTPUT}; do
-    if [ x${x} == xgfxterm ]; then
+    if [ "x${x}" = "xgfxterm" ]; then
         # If this platform supports gfxterm, try to use it.
        if ! test -e ${grub_prefix}/gfxterm.mod ; then
            if [ "x$termoutdefault" != "x1" ]; then