# --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: architecture/avr32/package/*/20-kernel-cc.patch # Copyright (C) 2004 - 2022 The T2 SDE Project # Copyright (C) 1998 - 2003 ROCK Linux Project # # This Copyright note is generated by scripts/Create-CopyPatch, # more information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License version 2 as used by the T2 SDE. # --- T2-COPYRIGHT-NOTE-END --- This patch is specific to the T2 SDE build system to not apply all the agressive compiler options, but only less, kernel specific ones. Patch initially for ROCK Linux by Clifford Wolf . --- linux-4.12/Makefile.orig 2018-01-08 14:54:02.692447258 +0000 +++ linux-4.12/Makefile 2018-01-08 14:54:35.648446051 +0000 @@ -348,7 +348,9 @@ # Make variables (CC, etc...) AS = $(CROSS_COMPILE)as LD = $(CROSS_COMPILE)ld -CC = $(CROSS_COMPILE)gcc +KCC = $(CROSS_COMPILE)kcc +GCC = $(CROSS_COMPILE)gcc +CC = $(if $(shell sh -c 'type $(KCC)'),$(KCC),$(GCC)) CPP = $(CC) -E AR = $(CROSS_COMPILE)ar NM = $(CROSS_COMPILE)nm