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

[PATCH] CFLAGS and LDFLAGS not used when building #20

Closed
andy-js opened this issue Dec 11, 2015 · 3 comments
Closed

[PATCH] CFLAGS and LDFLAGS not used when building #20

andy-js opened this issue Dec 11, 2015 · 3 comments

Comments

@andy-js
Copy link

andy-js commented Dec 11, 2015

This bit me in the ass when trying to cross-compile daemonize on illumos. The CFLAGS and LDFLAGS passed to configure don't get passed when building the code.

diff --git a/Makefile.in b/Makefile.in
index 9257b74..40d3dee 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -13,6 +13,8 @@ INSTALL_MAN    = $(INSTALL_PREFIX)/share/man
 MISSING_SOURCES        = @LOCAL_MISSING_SOURCES@
 MISSING_OBJECTS = $(MISSING_SOURCES:.c=.o)
 CC             = @CC@
+CFLAGS         = @CFLAGS@
+LDFLAGS                = @LDFLAGS@
 
 .PHONY: all psman install clean distclean
 
@@ -22,10 +24,10 @@ CC          = @CC@
 all: daemonize 
 
 daemonize: daemonize.o getopt.o $(MISSING_OBJECTS)
-       $(CC) $(CFLAGS) -o daemonize daemonize.o getopt.o $(MISSING_OBJECTS)
+       $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
 
 testdaemon: testdaemon.o
-       $(CC) $(CFLAGS) -o testdaemon testdaemon.o
+       $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
  
 psman: daemonize.ps

@bmc
Copy link
Owner

bmc commented Dec 11, 2015

Good catch. I can patch that in, or you can submit it as a pull request. Your choice.

@andy-js
Copy link
Author

andy-js commented Dec 11, 2015

I don't do pull requests. Patch away.

bmc added a commit that referenced this issue Dec 11, 2015
…es GitHub

Issue #20 Thanks to Andrew Stormont (andyjstormont /at/ gmail.com) for the patch.
@bmc
Copy link
Owner

bmc commented Dec 11, 2015

Patched and pushed. Change will be in next release (which I'll try to get out today).

@bmc bmc closed this as completed Dec 11, 2015
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

2 participants