Changeset 795e2bf in mainline for uspace


Ignore:
Timestamp:
2015-03-15T15:31:49Z (10 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0e4c5f0, 58775d30, eec5795
Parents:
c12f891
Message:

revive clang support
generate autotool and autogen probe sources in a more compatible manner
cstyle fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/Makefile.common

    rc12f891 r795e2bf  
    247247# something won't break because of that:
    248248# -fexec-charset=UTF-8 -fwide-exec-charset=UTF-32$(ENDIANESS) -finput-charset=UTF-8
    249 CLANG_CFLAGS = $(LIBC_INCLUDES_FLAGS) -O$(OPTIMIZATION) -imacros $(CONFIG_HEADER) \
     249CLANG_CFLAGS = $(INCLUDES_FLAGS) -O$(OPTIMIZATION) -imacros $(CONFIG_HEADER) \
    250250        -ffreestanding -fno-builtin -nostdlib -nostdinc \
    251251        -Wall -Wextra -Wno-unused-parameter -Wmissing-prototypes \
    252         -Werror-implicit-function-declaration -Wwrite-strings \
    253         -integrated-as \
    254         -pipe -g -target $(CLANG_TARGET) -D__$(ENDIANESS)__
     252        -std=gnu99 -Werror-implicit-function-declaration -Wwrite-strings \
     253        -integrated-as -pipe -g -target $(CLANG_TARGET) -D__$(ENDIANESS)__
    255254
    256255LIB_CFLAGS = $(CFLAGS) -fPIC -D__IN_SHARED_LIBC__
     
    290289
    291290ifeq ($(COMPILER),gcc_cross)
    292         CFLAGS += $(GCC_CFLAGS) $(EXTRA_CFLAGS)
     291        CFLAGS += $(GCC_CFLAGS)
    293292        DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
    294293endif
    295294
    296295ifeq ($(COMPILER),gcc_helenos)
    297         CFLAGS += $(GCC_CFLAGS) $(EXTRA_CFLAGS)
     296        CFLAGS += $(GCC_CFLAGS)
    298297        DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
    299298endif
    300299
    301300ifeq ($(COMPILER),gcc_native)
    302         CFLAGS += $(GCC_CFLAGS) $(EXTRA_CFLAGS)
     301        CFLAGS += $(GCC_CFLAGS)
    303302        DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
    304303endif
    305304
    306305ifeq ($(COMPILER),icc)
    307         CFLAGS += $(ICC_CFLAGS) $(EXTRA_CFLAGS)
     306        CFLAGS += $(ICC_CFLAGS)
    308307        DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
    309308endif
    310309
    311310ifeq ($(COMPILER),clang)
    312         CFLAGS += $(CLANG_CFLAGS) $(EXTRA_CFLAGS)
    313         GCC_CFLAGS += $(EXTRA_CFLAGS)
     311        CFLAGS += $(CLANG_CFLAGS)
    314312        DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
    315313endif
     
    373371
    374372%.o: %.S $(DEPEND)
    375         $(GCC) $(DEFS) $(GCC_CFLAGS) -D__ASM__ -c $< -o $@
    376 ifeq ($(PRECHECK),y)
    377         $(JOBFILE) $(JOB) $< $@ as asm/preproc $(DEFS) $(CFLAGS) -D__ASM__
     373        $(GCC) $(DEFS) $(GCC_CFLAGS) $(EXTRA_CFLAGS) -D__ASM__ -c $< -o $@
     374ifeq ($(PRECHECK),y)
     375        $(JOBFILE) $(JOB) $< $@ as asm/preproc $(DEFS) $(CFLAGS) $(EXTRA_CFLAGS) -D__ASM__
    378376endif
    379377
     
    385383
    386384%.o: %.c $(DEPEND)
    387         $(CC) $(DEFS) $(CFLAGS) -c $< -o $@
    388 ifeq ($(PRECHECK),y)
    389         $(JOBFILE) $(JOB) $< $@ cc core $(DEFS) $(CFLAGS)
     385        $(CC) $(DEFS) $(CFLAGS) $(EXTRA_CFLAGS) -c $< -o $@
     386ifeq ($(PRECHECK),y)
     387        $(JOBFILE) $(JOB) $< $@ cc core $(DEFS) $(CFLAGS) $(EXTRA_CFLAGS)
    390388endif
    391389
    392390%.test.o: %.c $(DEPEND)
    393         $(CC) $(DEFS) $(CFLAGS) $(TEST_CFLAGS) -c $< -o $@
    394 ifeq ($(PRECHECK),y)
    395         $(JOBFILE) $(JOB) $< $@ cc core $(DEFS) $(CFLAGS)
     391        $(CC) $(DEFS) $(CFLAGS) $(EXTRA_CFLAGS) $(TEST_CFLAGS) -c $< -o $@
     392ifeq ($(PRECHECK),y)
     393        $(JOBFILE) $(JOB) $< $@ cc core $(DEFS) $(CFLAGS) $(EXTRA_CFLAGS) $(TEST_CFLAGS)
    396394endif
    397395
    398396%.lo: %.S $(DEPEND)
    399         $(CC) $(DEFS) $(LIB_CFLAGS) -D__ASM__ -c $< -o $@
    400 ifeq ($(PRECHECK),y)
    401         $(JOBFILE) $(JOB) $< $@ as asm/preproc $(DEFS) $(CFLAGS) -D__ASM__
     397        $(CC) $(DEFS) $(LIB_CFLAGS) $(EXTRA_CFLAGS) -D__ASM__ -c $< -o $@
     398ifeq ($(PRECHECK),y)
     399        $(JOBFILE) $(JOB) $< $@ as asm/preproc $(DEFS) $(LIB_CFLAGS) $(EXTRA_CFLAGS) -D__ASM__
    402400endif
    403401
     
    409407
    410408%.lo: %.c $(DEPEND)
    411         $(CC) $(DEFS) $(LIB_CFLAGS) -c $< -o $@
    412 ifeq ($(PRECHECK),y)
    413         $(JOBFILE) $(JOB) $< $@ cc core $(DEFS) $(CFLAGS)
     409        $(CC) $(DEFS) $(LIB_CFLAGS) $(EXTRA_CFLAGS) -c $< -o $@
     410ifeq ($(PRECHECK),y)
     411        $(JOBFILE) $(JOB) $< $@ cc core $(DEFS) $(LIB_CFLAGS) $(EXTRA_CFLAGS)
    414412endif
    415413
    416414$(DEPEND): $(PRE_DEPEND)
    417         makedepend -f - -- $(DEPEND_DEFS) $(CFLAGS) -- $(SOURCES) $(TEST_SOURCES) > $@ 2> /dev/null
     415        makedepend -f - -- $(DEPEND_DEFS) $(CFLAGS) $(EXTRA_CFLAGS) -- $(SOURCES) $(TEST_SOURCES) > $@ 2> /dev/null
    418416        -[ -f $(DEPEND_PREV) ] && diff -q $(DEPEND_PREV) $@ && mv -f $(DEPEND_PREV) $@
    419417
Note: See TracChangeset for help on using the changeset viewer.