target.mk: check that CPU_TYPE has known CPU_CFLAGS mapping
[openwrt/openwrt.git] / include / target.mk
index 597563d5ec01c5c3ffbcb18989a46adb68e629ef..169ce6247a55b734d2aa462516dc18461fdad698 100644 (file)
@@ -170,10 +170,9 @@ ifeq ($(DUMP),1)
     CPU_CFLAGS_octeon = -march=octeon -mabi=64
   endif
   ifeq ($(ARCH),i386)
-    CPU_TYPE ?= i486
-    CPU_CFLAGS_i486 = -march=i486
+    CPU_TYPE ?= pentium
+    CPU_CFLAGS_pentium = -march=pentium-mmx
     CPU_CFLAGS_pentium4 = -march=pentium4
-    CPU_CFLAGS_geode = -march=geode -mmmx -m3dnow
   endif
   ifneq ($(findstring arm,$(ARCH)),)
     CPU_TYPE ?= xscale
@@ -219,6 +218,11 @@ ifeq ($(DUMP),1)
     CPU_CFLAGS_arc700 = -marc700
     CPU_CFLAGS_archs = -marchs
   endif
+  ifneq ($(CPU_TYPE),)
+    ifndef CPU_CFLAGS_$(CPU_TYPE)
+      $(warning CPU_TYPE "$(CPU_TYPE)" doesn't correspond to a known type)
+    endif
+  endif
   DEFAULT_CFLAGS=$(strip $(CPU_CFLAGS) $(CPU_CFLAGS_$(CPU_TYPE)) $(CPU_CFLAGS_$(CPU_SUBTYPE)))
 
   ifneq ($(BOARD),)