summarylogtreecommitdiffstats
path: root/makepkg-loong64.patch
blob: 00962549568a4beaec8c403f0e31d35d4c5c7e03 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
@@ -35,18 +35,16 @@
 # ARCHITECTURE, COMPILE FLAGS
 #########################################################################
 #
-CARCH="x86_64"
-CHOST="x86_64-pc-linux-gnu"
+CARCH="loong64"
+CHOST="loongarch64-unknown-linux-gnu"
 
 #-- Compiler and Linker Flags
 #CPPFLAGS=""
-CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions \
-        -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security \
-        -fstack-clash-protection -fcf-protection \
-        -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"
+CFLAGS="-mabi=lp64d -march=loongarch64 -mlsx -O2 -pipe -fexceptions \
+        -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security \
+        -fstack-clash-protection"
 CXXFLAGS="$CFLAGS -Wp,-D_GLIBCXX_ASSERTIONS"
-LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now \
-         -Wl,-z,pack-relative-relocs"
+LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now"
 LTOFLAGS="-flto=auto"
 RUSTFLAGS="-Cforce-frame-pointers=yes"
 #-- Make Flags: change this for DistCC/SMP systems