Fork us on GitHub Follow us on Facebook Follow us on Twitter

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


Ignore:
Timestamp:
2017-10-03T18:12:17Z (4 years ago)
Author:
jzr <zarevucky.jiri@…>
Branches:
lfn, master
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/amd64/Makefile.inc

    r0f28387 ra0a273e  
    3232
    3333FPU_NO_CFLAGS = -mno-sse -mno-sse2
    34 CMN1 = -m64 -mcmodel=$(MEMORY_MODEL) -mno-red-zone -fno-unwind-tables -fno-omit-frame-pointer
    35 GCC_CFLAGS += $(CMN1)
    36 ICC_CFLAGS += $(CMN1)
    37 CLANG_CFLAGS += $(CMN1)
     34COMMON_CFLAGS += -m64 -mcmodel=$(MEMORY_MODEL) -mno-red-zone -fno-unwind-tables -fno-omit-frame-pointer
    3835
    3936BITS = 64
     
    4441
    4542ifeq ($(PROCESSOR),opteron)
    46         CMN2 := -march=opteron
    47         GCC_CFLAGS += $(CMN2)
    48         ICC_CFLAGS += $(CMN2)
     43        COMMON_CFLAGS += -march=opteron
    4944endif
    5045
Note: See TracChangeset for help on using the changeset viewer.