Changes in uspace/Makefile.common [a41cda7:94c5bc1] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/Makefile.common
ra41cda7 r94c5bc1 160 160 LIBNETTL_PREFIX = $(LIB_PREFIX)/nettl 161 161 162 AFLAGS = 162 AFLAGS = --fatal-warnings 163 163 LFLAGS = --fatal-warnings 164 165 # FIXME: This condition is a workaround for issues #692 and #693.166 ifneq ($(KARCH),ia64)167 ifneq ($(KARCH),mips32)168 AFLAGS += --fatal-warnings169 endif170 endif171 164 172 165 ifeq ($(STATIC_NEEDED),y) … … 210 203 endif 211 204 205 ifeq ($(CONFIG_OPTIMIZE_FOR_SIZE),y) 206 OPTIMIZATION = s 207 else 208 OPTIMIZATION = 3 209 endif 210 212 211 # PCUT-based unit tests 213 212 ifneq ($(TEST_SOURCES),) … … 235 234 find . -name '*.lo' -follow -exec rm \{\} \; 236 235 237 COMMON_CFLAGS = $(INCLUDES_FLAGS) -O$(OPTIMIZATION) -imacros $(CONFIG_HEADER) \ 238 -ffreestanding -fno-builtin -nostdlib -nostdinc -fexec-charset=UTF-8 \ 239 -finput-charset=UTF-8 -D__$(ENDIANESS)__ 240 241 GCC_CFLAGS = -ffunction-sections -Wall -Wextra -Wno-clobbered \ 242 -Wno-unused-parameter -Wmissing-prototypes -std=gnu99 \ 243 -Werror-implicit-function-declaration \ 244 -Wwrite-strings -pipe 245 246 ICC_CFLAGS = -Wall -Wextra -Wno-clobbered -Wno-unused-parameter \ 247 -Wmissing-prototypes -Werror-implicit-function-declaration \ 248 -Wwrite-strings -pipe 249 250 # -Wno-missing-prototypes is there because it warns about main(). 251 # This should be fixed elsewhere. 252 CLANG_CFLAGS = -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-typedef-redefinition \ 253 -Wno-missing-prototypes -Wno-unused-command-line-argument \ 236 GCC_CFLAGS = $(INCLUDES_FLAGS) -O$(OPTIMIZATION) -imacros $(CONFIG_HEADER) \ 237 -fexec-charset=UTF-8 -fwide-exec-charset=UTF-32$(ENDIANESS) \ 238 -finput-charset=UTF-8 -ffreestanding -fno-builtin -ffunction-sections \ 239 -nostdlib -nostdinc -Wall -Wextra -Wno-clobbered -Wno-unused-parameter \ 240 -Wmissing-prototypes -std=gnu99 -Werror-implicit-function-declaration \ 241 -Wwrite-strings -pipe -ggdb -D__$(ENDIANESS)__ 242 243 ICC_CFLAGS = $(INCLUDES_FLAGS) -O$(OPTIMIZATION) -imacros $(CONFIG_HEADER) \ 244 -fexec-charset=UTF-8 -fwide-exec-charset=UTF-32$(ENDIANESS) \ 245 -finput-charset=UTF-8 -ffreestanding -fno-builtin -nostdlib -nostdinc \ 246 -Wall -Wextra -Wno-clobbered -Wno-unused-parameter -Wmissing-prototypes \ 247 -Werror-implicit-function-declaration -Wwrite-strings \ 248 -pipe -g -D__$(ENDIANESS)__ 249 250 # clang does not support following options but I am not sure whether 251 # something won't break because of that: 252 # -fexec-charset=UTF-8 -fwide-exec-charset=UTF-32$(ENDIANESS) -finput-charset=UTF-8 253 CLANG_CFLAGS = $(INCLUDES_FLAGS) -O$(OPTIMIZATION) -imacros $(CONFIG_HEADER) \ 254 -ffreestanding -fno-builtin -nostdlib -nostdinc \ 255 -Wall -Wextra -Wno-unused-parameter -Wmissing-prototypes \ 254 256 -std=gnu99 -Werror-implicit-function-declaration -Wwrite-strings \ 255 -pipe -fno-stack-protector -fno-PIC 257 -integrated-as -pipe -g -target $(CLANG_TARGET) -D__$(ENDIANESS)__ 258 259 LIB_CFLAGS = $(CFLAGS) -fPIC 260 LIB_LFLAGS = $(LFLAGS) -shared -soname $(LSONAME) --whole-archive 256 261 257 262 ifeq ($(CONFIG_DEBUG),y) 258 COMMON_CFLAGS += -Werror 263 GCC_CFLAGS += -Werror 264 ICC_CFLAGS += -Werror 259 265 endif 260 266 … … 267 273 # Prepare for POSIX before including platform specific stuff 268 274 ifeq ($(POSIX_COMPAT),y) 269 CFLAGS += -I$(LIBPOSIX_PREFIX)/include/posix -I$(LIBPOSIX_PREFIX)/include/275 CFLAGS = -I$(LIBPOSIX_PREFIX)/include/posix -I$(LIBPOSIX_PREFIX)/include/ 270 276 BASE_LIBS = $(LIBPOSIX_PREFIX)/libposixaslibc.a $(LIBPOSIX_PREFIX)/libc4posix.a $(LIBSOFTINT_PREFIX)/libsoftint.a 271 277 endif … … 282 288 283 289 ifeq ($(COMPILER),gcc_cross) 284 CFLAGS += $( COMMON_CFLAGS) $(GCC_CFLAGS)290 CFLAGS += $(GCC_CFLAGS) 285 291 DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS) 286 292 endif 287 293 288 294 ifeq ($(COMPILER),gcc_helenos) 289 CFLAGS += $( COMMON_CFLAGS) $(GCC_CFLAGS)295 CFLAGS += $(GCC_CFLAGS) 290 296 DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS) 291 297 endif 292 298 293 299 ifeq ($(COMPILER),gcc_native) 294 CFLAGS += $( COMMON_CFLAGS) $(GCC_CFLAGS)300 CFLAGS += $(GCC_CFLAGS) 295 301 DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS) 296 302 endif 297 303 298 304 ifeq ($(COMPILER),icc) 299 CFLAGS += $( COMMON_CFLAGS) $(ICC_CFLAGS)305 CFLAGS += $(ICC_CFLAGS) 300 306 DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS) 301 307 endif 302 308 303 309 ifeq ($(COMPILER),clang) 304 CFLAGS += $(C OMMON_CFLAGS) $(CLANG_CFLAGS)310 CFLAGS += $(CLANG_CFLAGS) 305 311 DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS) 306 312 endif 307 308 LIB_CFLAGS = $(CFLAGS) -fPIC309 LIB_LFLAGS = $(LFLAGS) -shared -soname $(LSONAME) --whole-archive310 313 311 314 ifneq ($(MAKECMDGOALS),clean) 312 315 -include $(DEPEND) 313 316 endif 314 315 AS_CFLAGS := $(addprefix -Xassembler ,$(AFLAGS))316 LD_CFLAGS := $(addprefix -Xlinker ,$(LFLAGS))317 317 318 318 OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) … … 378 378 379 379 %.o: %.S $(DEPEND) 380 $( CC) $(DEFS) $(CFLAGS) $(EXTRA_CFLAGS) $(AS_CFLAGS) -D__ASM__ -c $< -o $@380 $(GCC) $(DEFS) $(GCC_CFLAGS) $(EXTRA_CFLAGS) -D__ASM__ -c $< -o $@ 381 381 ifeq ($(PRECHECK),y) 382 382 $(JOBFILE) $(JOB) $< $@ as asm/preproc $(DEFS) $(CFLAGS) $(EXTRA_CFLAGS) -D__ASM__ … … 384 384 385 385 %.o: %.s $(DEPEND) 386 $( CC) $(DEFS) $(CFLAGS) $(EXTRA_CFLAGS) $(AS_CFLAGS) -D__ASM__ -c $< -o $@386 $(AS) $(AFLAGS) -o $@ $< 387 387 ifeq ($(PRECHECK),y) 388 388 $(JOBFILE) $(JOB) $< $@ as asm … … 402 402 403 403 %.lo: %.S $(DEPEND) 404 $(CC) $(DEFS) $(LIB_CFLAGS) $(EXTRA_CFLAGS) $(AS_CFLAGS)-D__ASM__ -c $< -o $@404 $(CC) $(DEFS) $(LIB_CFLAGS) $(EXTRA_CFLAGS) -D__ASM__ -c $< -o $@ 405 405 ifeq ($(PRECHECK),y) 406 406 $(JOBFILE) $(JOB) $< $@ as asm/preproc $(DEFS) $(LIB_CFLAGS) $(EXTRA_CFLAGS) -D__ASM__ … … 408 408 409 409 %.lo: %.s $(DEPEND) 410 $( CC) $(DEFS) $(LIB_CFLAGS) $(EXTRA_CFLAGS) $(AS_CFLAGS) -D__ASM__ -c $< -o $@410 $(AS) $(AFLAGS) -o $@ $< 411 411 ifeq ($(PRECHECK),y) 412 412 $(JOBFILE) $(JOB) $< $@ as asm
Note:
See TracChangeset
for help on using the changeset viewer.