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