summaryrefslogtreecommitdiff
path: root/tools/root.make
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2010-12-27 17:27:59 +0000
committerThomas Martitz <kugel@rockbox.org>2010-12-27 17:27:59 +0000
commit0bf1bd1d51750bf9eb0b3e149452dc1c3a89166c (patch)
treeddc94b863dda316e420f72673e3a86a3732965c8 /tools/root.make
parent6cbacb1b3eef1ea9c2f1c9ef58795421912cfb90 (diff)
downloadrockbox-0bf1bd1d51750bf9eb0b3e149452dc1c3a89166c.zip
rockbox-0bf1bd1d51750bf9eb0b3e149452dc1c3a89166c.tar.gz
rockbox-0bf1bd1d51750bf9eb0b3e149452dc1c3a89166c.tar.bz2
rockbox-0bf1bd1d51750bf9eb0b3e149452dc1c3a89166c.tar.xz
Redo r28026 so that all .S files get the __ASSEMBLER__ define.
Patch by Thomas Jarosch. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28913 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'tools/root.make')
-rw-r--r--tools/root.make5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/root.make b/tools/root.make
index 401599a..885a80d 100644
--- a/tools/root.make
+++ b/tools/root.make
@@ -16,6 +16,7 @@ INCLUDES = -I$(BUILDDIR) -I$(BUILDDIR)/lang $(TARGET_INC)
CFLAGS = $(INCLUDES) $(DEFINES) $(GCCOPTS)
PPCFLAGS = $(filter-out -g -Dmain=SDL_main,$(CFLAGS)) # cygwin sdl-config fix
+ASMFLAGS = -D__ASSEMBLER__ # work around gcc 3.4.x bug with -std=gnu99, only meant for .S files
TOOLS = $(TOOLSDIR)/rdf2binary $(TOOLSDIR)/convbdf \
$(TOOLSDIR)/codepages $(TOOLSDIR)/scramble $(TOOLSDIR)/bmp2rb \
@@ -343,7 +344,7 @@ $(BUILDDIR)/%.o: $(ROOTDIR)/%.c
$(BUILDDIR)/%.o: $(ROOTDIR)/%.S
$(SILENT)mkdir -p $(dir $@)
- $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(CFLAGS) -c $< -o $@
+ $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(CFLAGS) $(ASMFLAGS) -c $< -o $@
# generated definitions for use in .S files
$(BUILDDIR)/%_asmdefs.h: $(ROOTDIR)/%_asmdefs.c
@@ -358,7 +359,7 @@ $(BUILDDIR)/%_asmdefs.h: $(ROOTDIR)/%_asmdefs.c
%.o: %.S
$(SILENT)mkdir -p $(dir $@)
- $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(CFLAGS) -c $< -o $@
+ $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(CFLAGS) $(ASMFLAGS) -c $< -o $@
Makefile: $(TOOLSDIR)/configure
ifneq (reconf,$(MAKECMDGOALS))