Dash:
[t2-trunk.git] / architecture / arm64 / package / linux / 20-kernel-cc.patch
blob5a3caf959bdc9198e11b323f6b5df3699a756f12
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by scripts/Create-CopyPatch.
3 #
4 # T2 SDE: architecture/arm64/package/.../20-kernel-cc.patch
5 # Copyright (C) 2004 - 2020 The T2 SDE Project
6 # Copyright (C) 1998 - 2003 ROCK Linux Project
7 #
8 # More information can be found in the files COPYING and README.
9 #
10 # This patch file is dual-licensed. It is available under the license the
11 # patched project is licensed under, as long as it is an OpenSource license
12 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
13 # of the GNU General Public License as published by the Free Software
14 # Foundation; either version 2 of the License, or (at your option) any later
15 # version.
16 # --- T2-COPYRIGHT-NOTE-END ---
18 This patch is specific to the T2 SDE build system to not apply all the
19 agressive compiler options, but only less, kernel specific ones.
20 Patch initially for ROCK Linux by Clifford Wolf <god@clifford.at>.
22 --- linux-5.7/Makefile.vanilla 2020-06-07 17:49:30.990005509 +0200
23 +++ linux-5.7/Makefile 2020-06-07 17:51:05.370005020 +0200
24 @@ -426,7 +426,9 @@
25 OBJSIZE = llvm-size
26 STRIP = llvm-strip
27 else
28 -CC = $(CROSS_COMPILE)gcc
29 +KCC = $(CROSS_COMPILE)kcc
30 +GCC = $(CROSS_COMPILE)gcc
31 +CC = $(if $(shell sh -c 'type $(KCC)'),$(KCC),$(GCC))
32 LD = $(CROSS_COMPILE)ld
33 AR = $(CROSS_COMPILE)ar
34 NM = $(CROSS_COMPILE)nm