Changeset a0a273e in mainline for kernel/arch/ia32/Makefile.inc


Ignore:
Timestamp:
2017-10-03T18:12:17Z (7 years ago)
Author:
jzr <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a41cda7
Parents:
0f28387
Message:

Unify compiler handling a bit.

Most compiler flags have been changed from GCC-specific to "common",
since code might build but not work properly without them.
Clang still rejects some of the flags, but at least we can see
the incompatibilities now.

Explicit —target flag was removed from clang, in favor of using clang
through a target-specific symlink. This allows clang to automatically
find correct assembler and linker, if it needs to.

Additionally, assembly language files are now compiled using $(CC)
whether or not they need the preprocessor. This allows clang to build
.s files using its integrated assembler.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ia32/Makefile.inc

    r0f28387 ra0a273e  
    3434ENDIANESS = LE
    3535
    36 CMN1 = -m32 -fno-omit-frame-pointer
    37 GCC_CFLAGS += $(CMN1)
    38 ICC_CFLAGS += $(CMN1)
    39 CLANG_CFLAGS += $(CMN1)
     36COMMON_CFLAGS += -m32 -fno-omit-frame-pointer
    4037
    4138## Accepted CPUs
     
    4340
    4441ifeq ($(PROCESSOR),i486)
    45         CMN2 = -march=i486
     42        COMMON_CFLAGS += -march=i486
    4643endif
    4744
    4845ifeq ($(PROCESSOR),athlon_xp)
    49         CMN2 = -march=athlon-xp
     46        COMMON_CFLAGS += -march=athlon-xp
    5047endif
    5148
    5249ifeq ($(PROCESSOR),athlon_mp)
    53         CMN2 = -march=athlon-mp
     50        COMMON_CFLAGS += -march=athlon-mp
    5451endif
    5552
    5653ifeq ($(PROCESSOR),pentium3)
    57         CMN2 = -march=pentium3
     54        COMMON_CFLAGS += -march=pentium3
    5855endif
    5956
    6057ifeq ($(PROCESSOR),pentium4)
    61         CMN2 = -march=pentium4
     58        COMMON_CFLAGS += -march=pentium4
    6259endif
    6360
    6461ifeq ($(PROCESSOR),core)
    65         CMN2 = -march=prescott
     62        COMMON_CFLAGS += -march=prescott
    6663endif
    6764
    6865FPU_NO_CFLAGS = -mno-mmx -mno-sse -mno-sse2 -mno-sse3 -mno-3dnow
    69 GCC_CFLAGS += $(CMN2)
    70 ICC_CFLAGS += $(CMN2)
    71 CLANG_CFLAGS += $(CMN2)
    7266
    7367ARCH_SOURCES = \
Note: See TracChangeset for help on using the changeset viewer.