Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable custom CFLAGS and LDFLAGS in "Makefile.linux" #53

Open
andrei-korshikov opened this issue Sep 24, 2024 · 0 comments
Open

Enable custom CFLAGS and LDFLAGS in "Makefile.linux" #53

andrei-korshikov opened this issue Sep 24, 2024 · 0 comments

Comments

@andrei-korshikov
Copy link

One patch is better than thousand words:D

diff --git a/src/Makefile.linux b/src/Makefile.linux
index fd765f1..6418b6f 100644
--- a/src/Makefile.linux
+++ b/src/Makefile.linux
@@ -4,8 +4,8 @@ OSTYPE=Linux
 CPUTYPE:=$(shell uname -m)
 HVOPT=-DHV

-CFLAGS=-D$(OSTYPE) -D$(CPUTYPE) $(HVOPT) -Wall -DTAP
-LDFLAGS=-lpthread -lutil
+CFLAGS:=$(CFLAGS) -D$(OSTYPE) -D$(CPUTYPE) $(HVOPT) -Wall -DTAP
+LDFLAGS:=$(LDFLAGS) -lpthread -lutil
 OBJS=vpcs.o \
    daemon.o \
    readline.o \

My use case
I've created vpcs-git package in the Arch Linux User Repository (AUR). During creation, I've got a couple of minor issues — ELF file ('usr/bin/vpcs') lacks FULL RELRO, check LDFLAGS and ELF file ('usr/bin/vpcs') lacks GNU_PROPERTY_X86_FEATURE_1_SHSTK. These issues are really minor and not essential, but… what bad things could happen if custom (system-wide) CFLAGS and LDFLAGS would be enabled?

Related issue
#1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant