Changes in uspace/Makefile.common [94c5bc1:a41cda7] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/Makefile.common
r94c5bc1 ra41cda7 160 160 LIBNETTL_PREFIX = $(LIB_PREFIX)/nettl 161 161 162 AFLAGS = --fatal-warnings162 AFLAGS = 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-warnings 169 endif 170 endif 164 171 165 172 ifeq ($(STATIC_NEEDED),y) … … 203 210 endif 204 211 205 ifeq ($(CONFIG_OPTIMIZE_FOR_SIZE),y)206 OPTIMIZATION = s207 else208 OPTIMIZATION = 3209 endif210 211 212 # PCUT-based unit tests 212 213 ifneq ($(TEST_SOURCES),) … … 234 235 find . -name '*.lo' -follow -exec rm \{\} \; 235 236 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 \ 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 \ 256 254 -std=gnu99 -Werror-implicit-function-declaration -Wwrite-strings \ 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 255 -pipe -fno-stack-protector -fno-PIC 261 256 262 257 ifeq ($(CONFIG_DEBUG),y) 263 GCC_CFLAGS += -Werror 264 ICC_CFLAGS += -Werror 258 COMMON_CFLAGS += -Werror 265 259 endif 266 260 … … 273 267 # Prepare for POSIX before including platform specific stuff 274 268 ifeq ($(POSIX_COMPAT),y) 275 CFLAGS = -I$(LIBPOSIX_PREFIX)/include/posix -I$(LIBPOSIX_PREFIX)/include/269 CFLAGS += -I$(LIBPOSIX_PREFIX)/include/posix -I$(LIBPOSIX_PREFIX)/include/ 276 270 BASE_LIBS = $(LIBPOSIX_PREFIX)/libposixaslibc.a $(LIBPOSIX_PREFIX)/libc4posix.a $(LIBSOFTINT_PREFIX)/libsoftint.a 277 271 endif … … 288 282 289 283 ifeq ($(COMPILER),gcc_cross) 290 CFLAGS += $( GCC_CFLAGS)284 CFLAGS += $(COMMON_CFLAGS) $(GCC_CFLAGS) 291 285 DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS) 292 286 endif 293 287 294 288 ifeq ($(COMPILER),gcc_helenos) 295 CFLAGS += $( GCC_CFLAGS)289 CFLAGS += $(COMMON_CFLAGS) $(GCC_CFLAGS) 296 290 DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS) 297 291 endif 298 292 299 293 ifeq ($(COMPILER),gcc_native) 300 CFLAGS += $( GCC_CFLAGS)294 CFLAGS += $(COMMON_CFLAGS) $(GCC_CFLAGS) 301 295 DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS) 302 296 endif 303 297 304 298 ifeq ($(COMPILER),icc) 305 CFLAGS += $( ICC_CFLAGS)299 CFLAGS += $(COMMON_CFLAGS) $(ICC_CFLAGS) 306 300 DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS) 307 301 endif 308 302 309 303 ifeq ($(COMPILER),clang) 310 CFLAGS += $(C LANG_CFLAGS)304 CFLAGS += $(COMMON_CFLAGS) $(CLANG_CFLAGS) 311 305 DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS) 312 306 endif 307 308 LIB_CFLAGS = $(CFLAGS) -fPIC 309 LIB_LFLAGS = $(LFLAGS) -shared -soname $(LSONAME) --whole-archive 313 310 314 311 ifneq ($(MAKECMDGOALS),clean) 315 312 -include $(DEPEND) 316 313 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 $( GCC) $(DEFS) $(GCC_CFLAGS) $(EXTRA_CFLAGS) -D__ASM__ -c $< -o $@380 $(CC) $(DEFS) $(CFLAGS) $(EXTRA_CFLAGS) $(AS_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 $( AS) $(AFLAGS) -o $@ $<386 $(CC) $(DEFS) $(CFLAGS) $(EXTRA_CFLAGS) $(AS_CFLAGS) -D__ASM__ -c $< -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) -D__ASM__ -c $< -o $@404 $(CC) $(DEFS) $(LIB_CFLAGS) $(EXTRA_CFLAGS) $(AS_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 $( AS) $(AFLAGS) -o $@ $<410 $(CC) $(DEFS) $(LIB_CFLAGS) $(EXTRA_CFLAGS) $(AS_CFLAGS) -D__ASM__ -c $< -o $@ 411 411 ifeq ($(PRECHECK),y) 412 412 $(JOBFILE) $(JOB) $< $@ as asm
Note:
See TracChangeset
for help on using the changeset viewer.