30 lines
786 B
Diff
30 lines
786 B
Diff
|
|
From 5f57fa5c6d4bf4b16bfa1313d2918d27192980e6 Mon Sep 17 00:00:00 2001
|
||
|
|
From: wang--ge <wang__ge@126.com>
|
||
|
|
Date: Tue, 6 Jun 2023 15:00:54 +0800
|
||
|
|
Subject: [PATCH] add pie compile option
|
||
|
|
|
||
|
|
---
|
||
|
|
Makefile | 4 ++--
|
||
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||
|
|
|
||
|
|
diff --git a/Makefile b/Makefile
|
||
|
|
index e65b64c..6373ee4 100644
|
||
|
|
--- a/Makefile
|
||
|
|
+++ b/Makefile
|
||
|
|
@@ -39,10 +39,10 @@ BINDIR=$(PREFIX)/bin
|
||
|
|
all: ttmkfdir
|
||
|
|
|
||
|
|
.cpp.o:
|
||
|
|
- libtool --mode=compile $(CXX) $(CXXFLAGS) -o $@ -c $^
|
||
|
|
+ libtool --mode=compile $(CXX) $(CXXFLAGS) -fPIE -o $@ -c $^
|
||
|
|
|
||
|
|
ttmkfdir: ttmkfdir.o directory.o commandline.o ttf.o encoding.o parser.o builtin.o
|
||
|
|
- libtool --mode=link $(CXX) -o $@ $^ $(LDFLAGS)
|
||
|
|
+ libtool --mode=link $(CXX) -pie -o $@ $^ $(LDFLAGS)
|
||
|
|
|
||
|
|
parser.cpp: encoding.l
|
||
|
|
flex -i -8 -o$@ $<
|
||
|
|
--
|
||
|
|
2.33.0
|
||
|
|
|