This patch cleans up the calls to $CC in mainboard Config.lb files. They
authorCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Sun, 12 Apr 2009 21:47:09 +0000 (21:47 +0000)
committerCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Sun, 12 Apr 2009 21:47:09 +0000 (21:47 +0000)
commit6dcbe7f5401bca80c738bd2f888ff13f4d59064f
tree9c0df2aa99c9c86067654812526930a519998684
parente86c65b62e4dff095512058fe300814c424ceb6f
This patch cleans up the calls to $CC in mainboard Config.lb files. They
now all have the same parameter order.

action "$(CC) $(DISTRO_CFLAGS) $(CFLAGS) $(CPPFLAGS) $(DEBUG_CFLAGS)
-I$(TOP)/src -I. -nostdinc -nostdlib -fno-builtin -Wall -Os -c -S
$(MAINBOARD)/$(CACHE_AS_RAM_AUTO_C) -o $@"

The idea behind this parameter order is:
- *FLAGS at the beginning.
- Use a common set of *FLAGS.
- Include files and directories listed afterwards.
- nostdinc, nostdlib, no-builtin tell the compiler this is standalone
  code.
- Warnings. They do not influence source or compilation.
- Compilation strategy (small) and output mode (asm or binary).
- File to be compiled.
- Output name.
- $(DEBUG_CFLAGS) and -S are only used for asm output.

Other changes in this patch:

- src/supermicro/h8dme/Config.lb now uses $DEBUG_CFLAGS instead of
hardcoding the respective flags.

- $DEBUG_CFLAGS was added to asm outputting $CC calls:
supermicro/h8dme/Config.lb
lippert/roadrunner-lx/Config.lb

- $DISTRO_CFLAGS was added to some $CC calls in:
iwill/dk8_htx/Config.lb (CAR AP code)
supermicro/h8dmr/Config.lb (CAR AP code)
supermicro/h8dme/Config.lb (CAR AP code)
gigabyte/m57sli/Config.lb (CAR AP code)
gigabyte/ga_2761gxdk/Config.lb (CAR AP code)
amd/serengeti_cheetah_fam10/Config.lb (everywhere)
msi/ms7135/Config.lb (everywhere)
nvidia/l1_2pvv/Config.lb (CAR AP code)
-$CFLAGS was added to all $CC calls in:
amd/db800/Config.lb
amd/dbm690t/Config.lb
amd/norwich/Config.lb
amd/pistachio/Config.lb
amd/serengeti_cheetah/Config.lb
amd/serengeti_cheetah_fam10/Config.lb
arima/hdama/Config.lb
artecgroup/dbe61/Config.lb
asus/a8n_e/Config.lb
asus/a8v-e_se/Config.lb
asus/m2v-mx_se/Config.lb
broadcom/blast/Config.lb
digitallogic/msm800sev/Config.lb
gigabyte/ga_2761gxdk/Config.lb
gigabyte/m57sli/Config.lb
ibm/e325/Config.lb
ibm/e326/Config.lb
iei/pcisa-lx-800-r10/Config.lb
iwill/dk8_htx/Config.lb
iwill/dk8s2/Config.lb
iwill/dk8x/Config.lb
kontron/986lcd-m/Config.lb
lippert/roadrunner-lx/Config.lb
lippert/spacerunner-lx/Config.lb
msi/ms7135/Config.lb
msi/ms7260/Config.lb
msi/ms9185/Config.lb
msi/ms9282/Config.lb
newisys/khepri/Config.lb
nvidia/l1_2pvv/Config.lb
pcengines/alix1c/Config.lb
sunw/ultra40/Config.lb
supermicro/h8dme/Config.lb
supermicro/h8dmr/Config.lb
technexion/tim8690/Config.lb
tyan/s2735/Config.lb
tyan/s2850/Config.lb
tyan/s2875/Config.lb
tyan/s2880/Config.lb
tyan/s2881/Config.lb
tyan/s2882/Config.lb
tyan/s2885/Config.lb
tyan/s2891/Config.lb
tyan/s2892/Config.lb
tyan/s2895/Config.lb
tyan/s2912/Config.lb
tyan/s2912_fam10/Config.lb
tyan/s4880/Config.lb
tyan/s4882/Config.lb

- Use $@ wherever appropriate.

- Kill that evil CACHE_AS_RAM_AUTO_C variable.

- Trailing whitespace fixups on lines which were touched anyway.

We now only have 6 remaining different calls to $CC whereas before there
were 20.
If I am allowed to rename src/mainboard/kontron/986lcd-m/auto.c to
src/mainboard/kontron/986lcd-m/cache_as_ram_auto.c, we're down to 4
different calls.
If we can decide on the use of $CPU_OPT, we are down to 3 different
calls.

One additional point I'd like to clear up:
if ASSEMBLER_DEBUG
makedefine DEBUG_CFLAGS := -g -dA -fverbose-asm
end

"-dA -fverbose-asm" is only useful for asm output. For these flags,
DEBUG_CFLAGS is a total misnomer. What about calling them
DEBUG_ASMCFLAGS or somesuch?
"-g" should be controllable by a separate switch. It is useful even for
object code.

The following targets are broken by this patch because they contain
implicit declarations, but the error did not trigger due to missing
CFLAGS:
amd/serengeti_cheetah
asus/a8v-e_se
asus/m2v-mx_se
digitallogic/msm800sev
pcengines/alix1c
supermicro/h8dme
supermicro/h8dmr

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>
Acked-by: Peter Stuge <peter@stuge.se>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4097 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
49 files changed:
src/mainboard/amd/db800/Config.lb
src/mainboard/amd/dbm690t/Config.lb
src/mainboard/amd/norwich/Config.lb
src/mainboard/amd/pistachio/Config.lb
src/mainboard/amd/serengeti_cheetah/Config.lb
src/mainboard/amd/serengeti_cheetah_fam10/Config.lb
src/mainboard/arima/hdama/Config.lb
src/mainboard/artecgroup/dbe61/Config.lb
src/mainboard/asus/a8n_e/Config.lb
src/mainboard/asus/a8v-e_se/Config.lb
src/mainboard/asus/m2v-mx_se/Config.lb
src/mainboard/broadcom/blast/Config.lb
src/mainboard/digitallogic/msm800sev/Config.lb
src/mainboard/gigabyte/ga_2761gxdk/Config.lb
src/mainboard/gigabyte/m57sli/Config.lb
src/mainboard/ibm/e325/Config.lb
src/mainboard/ibm/e326/Config.lb
src/mainboard/iei/pcisa-lx-800-r10/Config.lb
src/mainboard/iwill/dk8_htx/Config.lb
src/mainboard/iwill/dk8s2/Config.lb
src/mainboard/iwill/dk8x/Config.lb
src/mainboard/kontron/986lcd-m/Config.lb
src/mainboard/lippert/roadrunner-lx/Config.lb
src/mainboard/lippert/spacerunner-lx/Config.lb
src/mainboard/msi/ms7135/Config.lb
src/mainboard/msi/ms7260/Config.lb
src/mainboard/msi/ms9185/Config.lb
src/mainboard/msi/ms9282/Config.lb
src/mainboard/newisys/khepri/Config.lb
src/mainboard/nvidia/l1_2pvv/Config.lb
src/mainboard/pcengines/alix1c/Config.lb
src/mainboard/sunw/ultra40/Config.lb
src/mainboard/supermicro/h8dme/Config.lb
src/mainboard/supermicro/h8dmr/Config.lb
src/mainboard/technexion/tim8690/Config.lb
src/mainboard/tyan/s2735/Config.lb
src/mainboard/tyan/s2850/Config.lb
src/mainboard/tyan/s2875/Config.lb
src/mainboard/tyan/s2880/Config.lb
src/mainboard/tyan/s2881/Config.lb
src/mainboard/tyan/s2882/Config.lb
src/mainboard/tyan/s2885/Config.lb
src/mainboard/tyan/s2891/Config.lb
src/mainboard/tyan/s2892/Config.lb
src/mainboard/tyan/s2895/Config.lb
src/mainboard/tyan/s2912/Config.lb
src/mainboard/tyan/s2912_fam10/Config.lb
src/mainboard/tyan/s4880/Config.lb
src/mainboard/tyan/s4882/Config.lb