From 4b2047e265c4fbbacb900dfc95ff830dcb6f33f1 Mon Sep 17 00:00:00 2001 From: BVK Chaitanya Date: Tue, 19 Oct 2010 10:44:57 +0530 Subject: [PATCH 1/2] netbsd fixes --- Makefile.util.def | 77 ++++++++++++++++++++++++++++---------------- conf/Makefile.common | 6 ++-- 2 files changed, 53 insertions(+), 30 deletions(-) diff --git a/Makefile.util.def b/Makefile.util.def index c1fd077f7..e2101141b 100644 --- a/Makefile.util.def +++ b/Makefile.util.def @@ -1,5 +1,23 @@ AutoGen definitions Makefile.tpl; +library = { + name = libemu.a; + cflags = '$(CFLAGS_GNULIB)'; + cppflags = '$(CPPFLAGS_GNULIB)'; + + common = util/misc.c; + common = grub-core/kern/err.c; + common = grub-core/kern/env.c; + common = grub-core/kern/list.c; + common = grub-core/kern/misc.c; + common = grub-core/kern/disk.c; + common = grub-core/kern/partition.c; + common = grub-core/kern/emu/mm.c; + common = grub-core/kern/emu/misc.c; + common = grub-core/kern/emu/getroot.c; + common = grub-core/kern/emu/hostdisk.c; +}; + library = { name = libgrub.a; cflags = '$(CFLAGS_GCRY)'; @@ -11,13 +29,6 @@ library = { common_nodist = grub_script.yy.h; common_nodist = grub_script.tab.h; - common = util/misc.c; - common = grub-core/kern/misc.c; - common = grub-core/kern/emu/mm.c; - common = grub-core/kern/emu/misc.c; - common = grub-core/kern/emu/getroot.c; - common = grub-core/kern/emu/hostdisk.c; - common = grub-core/commands/blocklist.c; common = grub-core/commands/extcmd.c; common = grub-core/commands/ls.c; @@ -57,13 +68,8 @@ library = { common = grub-core/fs/xfs.c; common = grub-core/kern/command.c; common = grub-core/kern/device.c; - common = grub-core/kern/disk.c; - common = grub-core/kern/env.c; - common = grub-core/kern/err.c; common = grub-core/kern/file.c; common = grub-core/kern/fs.c; - common = grub-core/kern/list.c; - common = grub-core/kern/partition.c; common = grub-core/lib/arg.c; common = grub-core/lib/crypto.c; common = grub-core/lib/envblk.c; @@ -94,8 +100,9 @@ program = { name = grub-bin2h; common = util/bin2h.c; ldadd = libgrub.a; - ldadd = '$(LIBINTL) $(LIBDEVMAPPER)'; + ldadd = libemu.a; ldadd = grub-core/gnulib/libgnu.a; + ldadd = '$(LIBINTL) $(LIBDEVMAPPER)'; mansection = 1; }; @@ -108,9 +115,10 @@ program = { extra_dist = util/grub-mkimagexx.c; ldadd = libgrub.a; + ldadd = libemu.a; + ldadd = grub-core/gnulib/libgnu.a; ldadd = '$(LIBLZMA)'; ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)'; - ldadd = grub-core/gnulib/libgnu.a; cppflags = '-DGRUB_PKGLIBROOTDIR=\"$(pkglibrootdir)\"'; }; @@ -121,8 +129,9 @@ program = { common = util/grub-mkrelpath.c; ldadd = libgrub.a; - ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)'; + ldadd = libemu.a; ldadd = grub-core/gnulib/libgnu.a; + ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)'; }; program = { @@ -132,8 +141,9 @@ program = { common = util/grub-script-check.c; ldadd = libgrub.a; - ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)'; + ldadd = libemu.a; ldadd = grub-core/gnulib/libgnu.a; + ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)'; }; program = { @@ -143,8 +153,9 @@ program = { common = util/grub-editenv.c; ldadd = libgrub.a; - ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)'; + ldadd = libemu.a; ldadd = grub-core/gnulib/libgnu.a; + ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)'; }; program = { @@ -154,8 +165,9 @@ program = { common = util/grub-mkpasswd-pbkdf2.c; ldadd = libgrub.a; - ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)'; + ldadd = libemu.a; ldadd = grub-core/gnulib/libgnu.a; + ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)'; cflags = '$(CFLAGS_GCRY)'; cppflags = '$(CPPFLAGS_GCRY)'; }; @@ -173,8 +185,9 @@ program = { common = util/grub-pe2elf.c; ldadd = libgrub.a; - ldadd = '$(LIBINTL)'; + ldadd = libemu.a; ldadd = grub-core/gnulib/libgnu.a; + ldadd = '$(LIBINTL)'; condition = COND_GRUB_PE2ELF; }; @@ -190,8 +203,9 @@ program = { cppflags = '$(CPPFLAGS_GCRY)'; ldadd = libgrub.a; - ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)'; + ldadd = libemu.a; ldadd = grub-core/gnulib/libgnu.a; + ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)'; }; program = { @@ -203,9 +217,10 @@ program = { cflags = '$(freetype_cflags)'; ldadd = libgrub.a; - ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)'; + ldadd = libemu.a; ldadd = grub-core/gnulib/libgnu.a; ldadd = '$(freetype_libs)'; + ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)'; condition = COND_GRUB_MKFONT; }; @@ -222,8 +237,9 @@ program = { sparc64_ieee1275 = util/ieee1275/devicemap.c; ldadd = libgrub.a; - ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBUTIL) $(LIBZFS) $(LIBNVPAIR)'; + ldadd = libemu.a; ldadd = grub-core/gnulib/libgnu.a; + ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBUTIL) $(LIBZFS) $(LIBNVPAIR)'; }; program = { @@ -233,8 +249,9 @@ program = { common = util/grub-probe.c; ldadd = libgrub.a; - ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBUTIL) $(LIBZFS) $(LIBNVPAIR)'; + ldadd = libemu.a; ldadd = grub-core/gnulib/libgnu.a; + ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBUTIL) $(LIBZFS) $(LIBNVPAIR)'; }; program = { @@ -249,8 +266,9 @@ program = { sparc64_ieee1275 = util/ieee1275/ofpath.c; ldadd = libgrub.a; - ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBUTIL) $(LIBZFS) $(LIBNVPAIR)'; + ldadd = libemu.a; ldadd = grub-core/gnulib/libgnu.a; + ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBUTIL) $(LIBZFS) $(LIBNVPAIR)'; enable = i386_pc; enable = sparc64_ieee1275; @@ -263,8 +281,10 @@ program = { ieee1275 = util/ieee1275/ofpath.c; ldadd = libgrub.a; - ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBUTIL)'; + ldadd = libemu.a; ldadd = grub-core/gnulib/libgnu.a; + ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBUTIL)'; + enable = sparc64_ieee1275; }; @@ -275,8 +295,9 @@ program = { common = util/grub-mklayout.c; ldadd = libgrub.a; - ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)'; + ldadd = libemu.a; ldadd = grub-core/gnulib/libgnu.a; + ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)'; }; data = { @@ -584,6 +605,7 @@ program = { common = grub-core/tests/lib/test.c; cflags = -Wno-format; ldadd = libgrub.a; + ldadd = libemu.a; ldadd = grub-core/gnulib/libgnu.a; ldadd = '$(LIBDEVMAPPER)'; }; @@ -596,6 +618,7 @@ program = { common = grub-core/lib/i386/pc/vesa_modes_table.c; ldadd = libgrub.a; - ldflags = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)'; + ldadd = libemu.a; ldadd = grub-core/gnulib/libgnu.a; + ldflags = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)'; }; diff --git a/conf/Makefile.common b/conf/Makefile.common index 81bb3567e..32851e34e 100644 --- a/conf/Makefile.common +++ b/conf/Makefile.common @@ -67,9 +67,9 @@ LDFLAGS_PROGRAM = CPPFLAGS_PROGRAM = CCASFLAGS_PROGRAM = -CFLAGS_LIBRARY = $(CFLAGS_PROGRAM) -CPPFLAGS_LIBRARY = $(CPPFLAGS_PROGRAM) -CCASFLAGS_LIBRARY = $(CCASFLAGS_PROGRAM) +CFLAGS_LIBRARY = +CPPFLAGS_LIBRARY = +CCASFLAGS_LIBRARY = # Other variables From 3863137172e811d929624bd5f34c0636051374d7 Mon Sep 17 00:00:00 2001 From: BVK Chaitanya Date: Fri, 29 Oct 2010 14:44:25 +0530 Subject: [PATCH 2/2] renamed libemu and libgrub to libgrubkern and libgrubmods respectively --- Makefile.util.def | 90 +++++++++++++++++++++++------------------------ 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/Makefile.util.def b/Makefile.util.def index e2101141b..94dfb1044 100644 --- a/Makefile.util.def +++ b/Makefile.util.def @@ -1,25 +1,29 @@ AutoGen definitions Makefile.tpl; library = { - name = libemu.a; + name = libgrubkern.a; cflags = '$(CFLAGS_GNULIB)'; cppflags = '$(CPPFLAGS_GNULIB)'; common = util/misc.c; - common = grub-core/kern/err.c; - common = grub-core/kern/env.c; - common = grub-core/kern/list.c; - common = grub-core/kern/misc.c; + common = grub-core/kern/command.c; + common = grub-core/kern/device.c; common = grub-core/kern/disk.c; - common = grub-core/kern/partition.c; - common = grub-core/kern/emu/mm.c; - common = grub-core/kern/emu/misc.c; common = grub-core/kern/emu/getroot.c; common = grub-core/kern/emu/hostdisk.c; + common = grub-core/kern/emu/misc.c; + common = grub-core/kern/emu/mm.c; + common = grub-core/kern/env.c; + common = grub-core/kern/err.c; + common = grub-core/kern/file.c; + common = grub-core/kern/fs.c; + common = grub-core/kern/list.c; + common = grub-core/kern/misc.c; + common = grub-core/kern/partition.c; }; library = { - name = libgrub.a; + name = libgrubmods.a; cflags = '$(CFLAGS_GCRY)'; cppflags = '$(CPPFLAGS_GCRY)'; @@ -66,10 +70,6 @@ library = { common = grub-core/fs/ufs2.c; common = grub-core/fs/ufs.c; common = grub-core/fs/xfs.c; - common = grub-core/kern/command.c; - common = grub-core/kern/device.c; - common = grub-core/kern/file.c; - common = grub-core/kern/fs.c; common = grub-core/lib/arg.c; common = grub-core/lib/crypto.c; common = grub-core/lib/envblk.c; @@ -99,8 +99,8 @@ library = { program = { name = grub-bin2h; common = util/bin2h.c; - ldadd = libgrub.a; - ldadd = libemu.a; + ldadd = libgrubmods.a; + ldadd = libgrubkern.a; ldadd = grub-core/gnulib/libgnu.a; ldadd = '$(LIBINTL) $(LIBDEVMAPPER)'; mansection = 1; @@ -114,8 +114,8 @@ program = { common = util/resolve.c; extra_dist = util/grub-mkimagexx.c; - ldadd = libgrub.a; - ldadd = libemu.a; + ldadd = libgrubmods.a; + ldadd = libgrubkern.a; ldadd = grub-core/gnulib/libgnu.a; ldadd = '$(LIBLZMA)'; ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)'; @@ -128,8 +128,8 @@ program = { common = util/grub-mkrelpath.c; - ldadd = libgrub.a; - ldadd = libemu.a; + ldadd = libgrubmods.a; + ldadd = libgrubkern.a; ldadd = grub-core/gnulib/libgnu.a; ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)'; }; @@ -140,8 +140,8 @@ program = { common = util/grub-script-check.c; - ldadd = libgrub.a; - ldadd = libemu.a; + ldadd = libgrubmods.a; + ldadd = libgrubkern.a; ldadd = grub-core/gnulib/libgnu.a; ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)'; }; @@ -152,8 +152,8 @@ program = { common = util/grub-editenv.c; - ldadd = libgrub.a; - ldadd = libemu.a; + ldadd = libgrubmods.a; + ldadd = libgrubkern.a; ldadd = grub-core/gnulib/libgnu.a; ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)'; }; @@ -164,8 +164,8 @@ program = { common = util/grub-mkpasswd-pbkdf2.c; - ldadd = libgrub.a; - ldadd = libemu.a; + ldadd = libgrubmods.a; + ldadd = libgrubkern.a; ldadd = grub-core/gnulib/libgnu.a; ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)'; cflags = '$(CFLAGS_GCRY)'; @@ -184,8 +184,8 @@ program = { mansection = 1; common = util/grub-pe2elf.c; - ldadd = libgrub.a; - ldadd = libemu.a; + ldadd = libgrubmods.a; + ldadd = libgrubkern.a; ldadd = grub-core/gnulib/libgnu.a; ldadd = '$(LIBINTL)'; condition = COND_GRUB_PE2ELF; @@ -202,8 +202,8 @@ program = { cflags = '$(CFLAGS_GCRY)'; cppflags = '$(CPPFLAGS_GCRY)'; - ldadd = libgrub.a; - ldadd = libemu.a; + ldadd = libgrubmods.a; + ldadd = libgrubkern.a; ldadd = grub-core/gnulib/libgnu.a; ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)'; }; @@ -216,8 +216,8 @@ program = { cflags = '$(freetype_cflags)'; - ldadd = libgrub.a; - ldadd = libemu.a; + ldadd = libgrubmods.a; + ldadd = libgrubkern.a; ldadd = grub-core/gnulib/libgnu.a; ldadd = '$(freetype_libs)'; ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)'; @@ -236,8 +236,8 @@ program = { sparc64_ieee1275 = util/ieee1275/ofpath.c; sparc64_ieee1275 = util/ieee1275/devicemap.c; - ldadd = libgrub.a; - ldadd = libemu.a; + ldadd = libgrubmods.a; + ldadd = libgrubkern.a; ldadd = grub-core/gnulib/libgnu.a; ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBUTIL) $(LIBZFS) $(LIBNVPAIR)'; }; @@ -248,8 +248,8 @@ program = { mansection = 8; common = util/grub-probe.c; - ldadd = libgrub.a; - ldadd = libemu.a; + ldadd = libgrubmods.a; + ldadd = libgrubkern.a; ldadd = grub-core/gnulib/libgnu.a; ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBUTIL) $(LIBZFS) $(LIBNVPAIR)'; }; @@ -265,8 +265,8 @@ program = { sparc64_ieee1275 = util/ieee1275/ofpath.c; - ldadd = libgrub.a; - ldadd = libemu.a; + ldadd = libgrubmods.a; + ldadd = libgrubkern.a; ldadd = grub-core/gnulib/libgnu.a; ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBUTIL) $(LIBZFS) $(LIBNVPAIR)'; @@ -280,8 +280,8 @@ program = { ieee1275 = util/ieee1275/grub-ofpathname.c; ieee1275 = util/ieee1275/ofpath.c; - ldadd = libgrub.a; - ldadd = libemu.a; + ldadd = libgrubmods.a; + ldadd = libgrubkern.a; ldadd = grub-core/gnulib/libgnu.a; ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBUTIL)'; @@ -294,8 +294,8 @@ program = { common = util/grub-mklayout.c; - ldadd = libgrub.a; - ldadd = libemu.a; + ldadd = libgrubmods.a; + ldadd = libgrubkern.a; ldadd = grub-core/gnulib/libgnu.a; ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)'; }; @@ -604,8 +604,8 @@ program = { common = grub-core/kern/misc.c; common = grub-core/tests/lib/test.c; cflags = -Wno-format; - ldadd = libgrub.a; - ldadd = libemu.a; + ldadd = libgrubmods.a; + ldadd = libgrubkern.a; ldadd = grub-core/gnulib/libgnu.a; ldadd = '$(LIBDEVMAPPER)'; }; @@ -617,8 +617,8 @@ program = { common = grub-core/lib/legacy_parse.c; common = grub-core/lib/i386/pc/vesa_modes_table.c; - ldadd = libgrub.a; - ldadd = libemu.a; + ldadd = libgrubmods.a; + ldadd = libgrubkern.a; ldadd = grub-core/gnulib/libgnu.a; ldflags = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)'; };