2 makefile cleanup #3

wants to merge 2 commits into


None yet

2 participants

ghost commented Jul 2, 2012

Steve - see the commit message for the relevant changes.

This has only been tested on Linux (CentOS 6.2) if possible please ensure it builds correctly on OS X as well.

Michael Pellon added some commits Jun 29, 2012
Michael Pellon makefile: various cleanup
+ Use the uname convention from Git's makefile to detect the OS.

+ Use the standard OBJS variable so object file names are listed only once.

+ Make sure clean removes via OBJS.

+ Removed -mimpure-text flag as it is Solaris-only
  (see http://gcc.gnu.org/onlinedocs/gcc/Option-Summary.html)
  Older versions of GCC were more lenient of it's presence.
  Breaks under GCC 4.7.0 or later.

+ Make sure a jnilib is generated only on Darwin and so's are generated only
  on Linux.

Signed-off-by: Michael Pellon <michael@p3ll0n.net>
Michael Pellon makefile: restore osx compatibility
- Additional uname macros for determining underlying arch.

- New GCPROF_LIB macro that is generated as a .so or .jnilib depending
  on the underlying platform. Architecture and platform is also encoded
  in the filename.

- Comments added to improve readability.
ghanima commented Jan 16, 2013

Was playing around with this project and their seems to be an issue with the Makefile for linux installs. The section

LDFLAGS=-fno-strict-aliasing -fPIC -fno-omit-frame-pointer
-static-libgcc -mimpure-test -shared

The gcc option -mimpure-test is only compatible for solaris environments and not LINUX. I had to remove it in order to have it compile properly.

Might want to remove it from the main if you expect for the stanza to be LINUX specific.

Hope that helps.


The contributing user seems to have dissapeared...

ghanima commented Jan 25, 2013

I would be willing to submit a patch for the project, but looking at the commit history this is on purpose for OS X compatibility. If you are ok with this the LD_FLAGS would need to be set twice. Once for LINUX detection and one for OSX.

mariusae commented Feb 1, 2013

Please update so it's compatible with the recent change by @kaushiks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment