287 --- 3.7 Compilation flags
288
289 ccflags-y, asflags-y and ldflags-y
290 These three flags apply only to the kbuild makefile in which they
291 are assigned. They are used for all the normal cc, as and ld
292 invocations happening during a recursive build.
293 Note: Flags with the same behaviour were previously named:
294 EXTRA_CFLAGS, EXTRA_AFLAGS and EXTRA_LDFLAGS.
295 They are still supported but their usage is deprecated.
296
297 ccflags-y specifies options for compiling with $(CC).
298
299 Example:
300 # drivers/acpi/Makefile
301 ccflags-y := -Os
302 ccflags-$(CONFIG_ACPI_DEBUG) += -DACPI_DEBUG_OUTPUT
303
304 This variable is necessary because the top Makefile owns the
305 variable $(KBUILD_CFLAGS) and uses it for compilation flags for the
306 entire tree.
307
308 asflags-y specifies options for assembling with $(AS).
309
310 Example:
311 #arch/sparc/kernel/Makefile
312 asflags-y := -ansi 作者: 0x1024 时间: 2016-11-16 20:39 回复 2# captivated