Changeset 23cdc921 in mainline


Ignore:
Timestamp:
2008-06-20T17:20:19Z (16 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
46c1234
Parents:
abe6163
Message:

Introduce the notion of FPU_NO_CFLAGS and separate building of test/fpu
objects and building the rest of kernel objects. Now, amd64 and ia32 can
enable things such as SSE selectively for the test/fpu/*.

Location:
kernel
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • kernel/Makefile

    rabe6163 r23cdc921  
    394394        $(AS) $(AFLAGS) $< -o $@
    395395
     396#
     397# The FPU tests are the only objects for which we allow the compiler to generate
     398# FPU instructions.
     399#
     400test/fpu/%.o: test/fpu/%.c
     401        $(CC) $(DEFS) $(CFLAGS) $(EXTRA_FLAGS) -c $< -o $@
     402
     403#
     404# Ordinary objects.
     405#
    396406%.o: %.c
    397         $(CC) $(DEFS) $(CFLAGS) $(EXTRA_FLAGS) -c $< -o $@
     407        $(CC) $(DEFS) $(CFLAGS) $(EXTRA_FLAGS) $(FPU_NO_CFLAGS) -c $< -o $@
  • kernel/arch/amd64/Makefile.inc

    rabe6163 r23cdc921  
    3636TOOLCHAIN_DIR = /usr/local/amd64
    3737
     38FPU_NO_CFLAGS = -mno-sse -mno-sse2
    3839CMN1 = -m64 -mcmodel=kernel -mno-red-zone -fno-unwind-tables
    3940GCC_CFLAGS += $(CMN1)
  • kernel/arch/ia32/Makefile.inc

    rabe6163 r23cdc921  
    4747
    4848ifeq ($(MACHINE),athlon-xp)
    49         CMN2 = -march=athlon-xp -mno-mmx -mno-sse -mno-3dnow
     49        FPU_NO_CFLAGS = -mno-mmx -mno-sse -mno-3dnow
     50        CMN2 = -march=athlon-xp
    5051        GCC_CFLAGS += $(CMN2)
    5152        ICC_CFLAGS += $(CMN2)
     
    5657endif
    5758ifeq ($(MACHINE),athlon-mp)
    58         CMN2 = -march=athlon-mp -mno-mmx -mno-sse -mno-3dnow
     59        FPU_NO_CFLAGS = -mno-mmx -mno-sse -mno-3dnow
     60        CMN2 = -march=athlon-mp
    5961        GCC_CFLAGS += $(CMN2)
    6062        ICC_CFLAGS += $(CMN2)
     
    6466endif
    6567ifeq ($(MACHINE),pentium3)
    66         CMN2 = -march=pentium3 -mno-mmx -mno-sse
     68        FPU_NO_CFLAGS = -mno-mmx -mno-sse
     69        CMN2 = -march=pentium3
    6770        GCC_CFLAGS += $(CMN2)
    6871        ICC_CFLAGS += $(CMN2)
     
    7275endif
    7376ifeq ($(MACHINE),core)
    74         CMN2 = -march=prescott -mno-mmmx -mno-sse -mno-sse2 -mno-sse3
     77        FPU_NO_CFLAGS = -mno-mmmx -mno-sse -mno-sse2 -mno-sse3
     78        CMN2 = -march=prescott
    7579        GCC_CFLAGS += $(CMN2)
    7680        ICC_CFLAGS += $(CMN2)
     
    7983endif
    8084ifeq ($(MACHINE),pentium4)
    81         GCC_CFLAGS += -march=pentium4 -mno-mmx -mno-sse -mno-sse2
     85        FPU_NO_CFLAGS = -mno-mmx -mno-sse -mno-sse2
     86        GCC_CFLAGS += -march=pentium4
    8287        ICC_CFLAGS += -march=pentium4
    8388        SUNCC_CFLAGS += -xarch=sse2
Note: See TracChangeset for help on using the changeset viewer.