File: pass-debian-cflags.patch

package info (click to toggle)
kissat 4.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 4,068 kB
  • sloc: ansic: 39,220; sh: 1,218; makefile: 90
file content (48 lines) | stat: -rw-r--r-- 1,178 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
Description: Pass compiler flags to Makefile
Author: Shengqi Chen <harry-chen@outlook.com>
Forwarded: not-needed
Last-Update: 2024-10-13
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/configure
+++ b/configure
@@ -35,8 +35,8 @@
 ultimate=no
 unsat=no
 
-passtocompiler=""
-passtolinker=""
+passtocompiler="$CFLAGS $CPPFLAGS"
+passtolinker="$LDFLAGS"
 
 goals="libkissat.a kissat"
 
@@ -609,7 +609,7 @@
 [ $statistics = yes -a $metrics = no ] && CFLAGS="$CFLAGS -DSTATISTICS"
 [ $unsat = yes ] && CFLAGS="$CFLAGS -DUNSAT"
 
-CFLAGS="${CFLAGS}$passtocompiler"
+CFLAGS="${CFLAGS} $passtocompiler"
 
 msg "compiler '$CC $CFLAGS'"
 
@@ -620,7 +620,7 @@
   LD="${CC}"
   msg "linker '$LD' (no additional options)"
 else
-  LD="${CC}$passtolinker"
+  LD="${CC} $passtolinker"
   msg "linker '$LD' (additional options)"
 fi
 
--- a/makefile.in
+++ b/makefile.in
@@ -52,7 +52,7 @@
 	$(LD) -o $@ test.o $(TSTOBJ) $(LIBS) -lm
 
 kitten: kitten.c random.h stack.h makefile
-	$(CC) $(CFLAGS) -DSTAND_ALONE_KITTEN -o $@ ../src/kitten.c
+	$(CC) $(CFLAGS) $(LDFLAGS) -DSTAND_ALONE_KITTEN -o $@ ../src/kitten.c
 
 build.h:
 	../scripts/generate-build-header.sh > $@