File: Use-dpkg-buildflags-for-gcc-12.patch

package info (click to toggle)
afnix 3.7.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 65,288 kB
  • sloc: cpp: 201,098; xml: 35,338; makefile: 4,973; sh: 992; lisp: 249
file content (82 lines) | stat: -rw-r--r-- 2,224 bytes parent folder | download | duplicates (2)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
From 9d2fcaa4ea7213ba3b5c695fbced338571c7af9e Mon Sep 17 00:00:00 2001
From: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Date: Mon, 28 Nov 2022 11:43:03 +0900
Subject: [PATCH 2/2] Use dpkg-buildflags for gcc 12

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
---
 cnf/mak/afnix-gc12.mak | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/cnf/mak/afnix-gc12.mak b/cnf/mak/afnix-gc12.mak
index 53a853e1..461fe3a3 100644
--- a/cnf/mak/afnix-gc12.mak
+++ b/cnf/mak/afnix-gc12.mak
@@ -38,7 +38,7 @@ STACCFLAGS	=
 DYNCCFLAGS	= -fPIC
 PLTCCFLAGS      = 
 DEBUGFLAGS      = -g
-OPTCCFLAGS      = -O2
+OPTCCFLAGS      =
 PFLCCFLAGS      = -g -pg
 COVCCFLAGS      = -g -fprofile-arcs -ftest-coverage
 CPPCCFLAGS      = -nostdinc -nostdinc++
@@ -91,7 +91,7 @@ endif
 # adjust for linux platform
 ifeq ($(PLATNAME),linux)
 ARFLAGS		= rc
-LDFLAGS		= -shared -pthread
+LDFLAGS		+= -shared -pthread
 ifeq ($(LKMODE),soname)
 LDFLAGS	       += -Wl,-soname,$(SOMAJ)
 endif
@@ -104,7 +104,7 @@ endif
 # adjust for freebsd platform
 ifeq ($(PLATNAME),freebsd)
 ARFLAGS		= rc
-LDFLAGS		= -shared
+LDFLAGS		+= -shared
 ifeq ($(LKMODE),soname)
 LDFLAGS	       += -Wl,-soname,$(SOMAJ)
 endif
@@ -114,7 +114,7 @@ endif
 # adjust for gnu/freebsd platform
 ifeq ($(PLATNAME),gnukbsd)
 ARFLAGS		= rc
-LDFLAGS		= -shared
+LDFLAGS		+= -shared
 ifeq ($(LKMODE),soname)
 LDFLAGS	       += -Wl,-soname,$(SOMAJ)
 endif
@@ -124,7 +124,7 @@ endif
 # adjust for gnu platform
 ifeq ($(PLATNAME),gnu)
 ARFLAGS		= rc
-LDFLAGS		= -shared
+LDFLAGS		+= -shared
 ifeq ($(LKMODE),soname)
 LDFLAGS	       += -Wl,-soname,$(SOMAJ)
 endif
@@ -135,16 +135,16 @@ endif
 # - platform dependant final executable flags                                -
 # ----------------------------------------------------------------------------
 
-LKFLAGS		=
+LKFLAGS		= $(shell dpkg-buildflags --get LDFLAGS)
 
 # adjust linker flags for linux
 ifeq ($(PLATNAME),linux)
-LKFLAGS      	= -pthread
+LKFLAGS      	+= -pthread
 endif
 
 # adjust linker flags for freebsd
 ifeq ($(PLATNAME),freebsd)
-LKFLAGS      	= -pthread
+LKFLAGS      	+= -pthread
 endif
 
 # ----------------------------------------------------------------------------
-- 
2.36.1