]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2009-06-21 Robert Millan <rmh.grub@aybabtu.com>
authorrobertmh <robertmh@localhost>
Sun, 21 Jun 2009 17:24:30 +0000 (17:24 +0000)
committerrobertmh <robertmh@localhost>
Sun, 21 Jun 2009 17:24:30 +0000 (17:24 +0000)
        Fix asm file handling on ELF, and remove workarounds.

        * genmk.rb (class Programs): Detect assembly files, and set ASFLAGS
        and -DASM_FILE=1 appropiately (copied from `class Images' stanza).
        * kern/i386/ieee1275/startup.S (ASM_FILE): Remove macro.
        * kern/i386/coreboot/startup.S (ASM_FILE): Likewise.

ChangeLog
genmk.rb
kern/i386/coreboot/startup.S
kern/i386/ieee1275/startup.S

index c9bfe50f5bc1eefa6bf2dd3fc12177f507a0c8bd..0a580763e0c029f2e8f51aa159e6e3d35776f4af 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2009-06-21  Robert Millan  <rmh.grub@aybabtu.com>
+
+       Fix asm file handling on ELF, and remove workarounds.
+
+       * genmk.rb (class Programs): Detect assembly files, and set ASFLAGS
+       and -DASM_FILE=1 appropiately (copied from `class Images' stanza).
+       * kern/i386/ieee1275/startup.S (ASM_FILE): Remove macro.
+       * kern/i386/coreboot/startup.S (ASM_FILE): Likewise.
+
 2009-06-21  Vladimir Serbinenko  <phcoder@gmail.com>
 
        Load BSD ELF modules
index 36f40201cc2924be495d2b792aa91bbfa782dd07..e3866c1505b8b025803ef8085635c32c9e4523b7 100644 (file)
--- a/genmk.rb
+++ b/genmk.rb
@@ -280,10 +280,12 @@ MOSTLYCLEANFILES += #{deps_str}
       src = sources[i]
       fake_obj = File.basename(src).suffix('o')
       dep = deps[i]
+      flag = if /\.c$/ =~ src then 'CFLAGS' else 'ASFLAGS' end
+      extra_flags = if /\.S$/ =~ src then '-DASM_FILE=1' else '' end
       dir = File.dirname(src)
 
       "#{obj}: #{src} $(#{src}_DEPENDENCIES)
-       $(TARGET_CC) -I#{dir} -I$(srcdir)/#{dir} $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(#{prefix}_CFLAGS) -MD -c -o $@ $<
+       $(TARGET_CC) -I#{dir} -I$(srcdir)/#{dir} $(TARGET_CPPFLAGS) #{extra_flags} $(TARGET_#{flag}) $(#{prefix}_#{flag}) -MD -c -o $@ $<
 -include #{dep}
 
 "
index b14171e6f61829c58e507b5f652ad23414b15b4b..fc53a85429dfaf98cec192bf173568ceaaa2db2c 100644 (file)
@@ -16,8 +16,6 @@
  *  along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#define ASM_FILE       1
-
 #include <grub/symbol.h>
 #include <grub/machine/memory.h>
 #include <grub/cpu/linux.h>
index 3b030b1b49e3bb99a240d0b41c4e1f4e5a46ebad..dfbfab5947a492c645a3a85cb4cac3131dc334fc 100644 (file)
@@ -16,8 +16,6 @@
  *  along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#define ASM_FILE       1
-
 #include <grub/symbol.h>
 #include <grub/machine/memory.h>
 #include <grub/cpu/linux.h>