2010-01-20 Vladimir Serbinenko <phcoder@gmail.com>
Don't try to generate lists for kernel.img. * conf/i386-efi.rmk (pkglib_PROGRAMS): New variable. (pkglib_MODULES): Remove kernel.img. (kernel_img_EXPORTS): Removed. (kernel_img_RELOCATABLE): New variable. * conf/x86_64-efi.rmk: Likewise. * genmk.rb: Remove *_EXPORTS support and add *_RELOCATABLE support.
This commit is contained in:
parent
ca46729091
commit
327dbcd7b9
4 changed files with 23 additions and 8 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
|||
2010-01-20 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
Don't try to generate lists for kernel.img.
|
||||
|
||||
* conf/i386-efi.rmk (pkglib_PROGRAMS): New variable.
|
||||
(pkglib_MODULES): Remove kernel.img.
|
||||
(kernel_img_EXPORTS): Removed.
|
||||
(kernel_img_RELOCATABLE): New variable.
|
||||
* conf/x86_64-efi.rmk: Likewise.
|
||||
* genmk.rb: Remove *_EXPORTS support and add *_RELOCATABLE support.
|
||||
|
||||
2010-01-20 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* include/grub/misc.h (grub_sprintf): Removed. All users switched to
|
||||
|
|
|
@ -30,13 +30,14 @@ sbin_SCRIPTS = grub-install
|
|||
grub_install_SOURCES = util/i386/efi/grub-install.in
|
||||
|
||||
# Modules.
|
||||
pkglib_MODULES = kernel.img chain.mod appleldr.mod \
|
||||
pkglib_PROGRAMS = kernel.img
|
||||
pkglib_MODULES = chain.mod appleldr.mod \
|
||||
linux.mod halt.mod reboot.mod pci.mod lspci.mod \
|
||||
datetime.mod date.mod datehook.mod loadbios.mod \
|
||||
fixvideo.mod mmap.mod acpi.mod
|
||||
|
||||
# For kernel.img.
|
||||
kernel_img_EXPORTS = no
|
||||
kernel_img_RELOCATABLE = yes
|
||||
kernel_img_SOURCES = kern/i386/efi/startup.S kern/main.c kern/device.c \
|
||||
kern/disk.c kern/dl.c kern/file.c kern/fs.c kern/err.c \
|
||||
kern/misc.c kern/mm.c kern/term.c \
|
||||
|
|
|
@ -29,13 +29,14 @@ sbin_SCRIPTS = grub-install
|
|||
grub_install_SOURCES = util/i386/efi/grub-install.in
|
||||
|
||||
# Modules.
|
||||
pkglib_MODULES = kernel.img chain.mod appleldr.mod \
|
||||
pkglib_PROGRAMS = kernel.img
|
||||
pkglib_MODULES = chain.mod appleldr.mod \
|
||||
halt.mod reboot.mod linux.mod pci.mod lspci.mod \
|
||||
datetime.mod date.mod datehook.mod loadbios.mod \
|
||||
fixvideo.mod mmap.mod acpi.mod
|
||||
|
||||
# For kernel.img.
|
||||
kernel_img_EXPORTS = no
|
||||
kernel_img_RELOCATABLE = yes
|
||||
kernel_img_SOURCES = kern/x86_64/efi/startup.S kern/x86_64/efi/callwrap.S \
|
||||
kern/main.c kern/device.c \
|
||||
kern/disk.c kern/dl.c kern/file.c kern/fs.c kern/err.c \
|
||||
|
|
10
genmk.rb
10
genmk.rb
|
@ -132,13 +132,11 @@ clean-module-#{@name}.#{@rule_count}:
|
|||
|
||||
CLEAN_MODULE_TARGETS += clean-module-#{@name}.#{@rule_count}
|
||||
|
||||
ifneq ($(#{prefix}_EXPORTS),no)
|
||||
clean-module-#{@name}-symbol.#{@rule_count}:
|
||||
rm -f #{defsym}
|
||||
|
||||
CLEAN_MODULE_TARGETS += clean-module-#{@name}-symbol.#{@rule_count}
|
||||
DEFSYMFILES += #{defsym}
|
||||
endif
|
||||
mostlyclean-module-#{@name}.#{@rule_count}:
|
||||
rm -f #{deps_str}
|
||||
|
||||
|
@ -170,7 +168,6 @@ endif
|
|||
#{mod_src}: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
|
||||
sh $(srcdir)/genmodsrc.sh '#{mod_name}' $< > $@ || (rm -f $@; exit 1)
|
||||
|
||||
ifneq ($(#{prefix}_EXPORTS),no)
|
||||
ifneq ($(TARGET_APPLE_CC),1)
|
||||
#{defsym}: #{pre_obj}
|
||||
$(NM) -g --defined-only -P -p $< | sed 's/^\\([^ ]*\\).*/\\1 #{mod_name}/' > $@
|
||||
|
@ -178,7 +175,6 @@ else
|
|||
#{defsym}: #{pre_obj}
|
||||
$(NM) -g -P -p $< | grep -E '^[a-zA-Z0-9_]* [TDS]' | sed 's/^\\([^ ]*\\).*/\\1 #{mod_name}/' > $@
|
||||
endif
|
||||
endif
|
||||
|
||||
#{undsym}: #{pre_obj}
|
||||
echo '#{mod_name}' > $@
|
||||
|
@ -331,9 +327,15 @@ class Program
|
|||
"CLEANFILES += #{@name} #{objs_str}
|
||||
MOSTLYCLEANFILES += #{deps_str}
|
||||
|
||||
ifeq ($(#{prefix}_RELOCATABLE),yes)
|
||||
#{@name}: $(#{prefix}_DEPENDENCIES) #{objs_str}
|
||||
$(TARGET_CC) -Wl,-r,-d -o $@ #{objs_str} $(TARGET_LDFLAGS) $(#{prefix}_LDFLAGS)
|
||||
$(STRIP) --strip-unneeded -K start -R .note -R .comment $@
|
||||
else
|
||||
#{@name}: $(#{prefix}_DEPENDENCIES) #{objs_str}
|
||||
$(TARGET_CC) -o $@ #{objs_str} $(TARGET_LDFLAGS) $(#{prefix}_LDFLAGS)
|
||||
$(STRIP) -R .rel.dyn -R .reginfo -R .note -R .comment $@
|
||||
endif
|
||||
|
||||
" + objs.collect_with_index do |obj, i|
|
||||
src = sources[i]
|
||||
|
|
Loading…
Reference in a new issue