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

Move linking LIBS to end of command #9

Merged
merged 1 commit into from Feb 5, 2014
Merged

Conversation

jfryman
Copy link
Contributor

@jfryman jfryman commented Feb 2, 2014

This PR moves the all linking $(LIBS) to the end of the command. Newer versions of ld on Linux (Ubuntu 12.04, for example) get a little finicky about flag ordering.

Resolves:

root@grapple:/opt/makeme/vendor/stltwalker# make
cc -std=c99 -g -O2 -I/opt/makeme/vendor/stltwalker/src  -Wall -Werror -o /opt/makeme/vendor/stltwalker/src/stl.o -c /opt/makeme/vendor/stltwalker/src/stl.c
cc -std=c99 -g -O2 -I/opt/makeme/vendor/stltwalker/src  -Wall -Werror -o /opt/makeme/vendor/stltwalker/src/matrix.o -c /opt/makeme/vendor/stltwalker/src/matrix.c
cc -std=c99 -g -O2 -I/opt/makeme/vendor/stltwalker/src  -Wall -Werror -o /opt/makeme/vendor/stltwalker/src/pack.o -c /opt/makeme/vendor/stltwalker/src/pack.c
cc -std=c99 -g -O2 -I/opt/makeme/vendor/stltwalker/src  -Wall -Werror -o /opt/makeme/vendor/stltwalker/src/dbg.o -c /opt/makeme/vendor/stltwalker/src/dbg.c
cc -std=c99 -g -O2 -I/opt/makeme/vendor/stltwalker/src  -Wall -Werror -o /opt/makeme/vendor/stltwalker/src/transform.o -c /opt/makeme/vendor/stltwalker/src/transform.c
cc -std=c99 -g -O2 -I/opt/makeme/vendor/stltwalker/src  -Wall -Werror -o src/stltwalker.o -c src/stltwalker.c
cc -std=c99 -g -O2 -I/opt/makeme/vendor/stltwalker/src  -Wall -Werror -o stltwalker.new  -lm /opt/makeme/vendor/stltwalker/src/stl.o /opt/makeme/vendor/stltwalker/src/matrix.o /opt/makeme/vendor/stltwalker/src/pack.o /opt/makeme/vendor/stltwalker/src/dbg.o /opt/makeme/vendor/stltwalker/src/transform.o src/stltwalker.o
/opt/makeme/vendor/stltwalker/src/stl.o: In function `v3_cross':
/opt/makeme/vendor/stltwalker/src/stl.c:43: undefined reference to `sqrtf'
/opt/makeme/vendor/stltwalker/src/transform.o: In function `init_transform_rotateX_f':
/opt/makeme/vendor/stltwalker/src/transform.c:135: undefined reference to `sincosf'
/opt/makeme/vendor/stltwalker/src/transform.o: In function `init_transform_rotateY_f':
/opt/makeme/vendor/stltwalker/src/transform.c:155: undefined reference to `sincosf'
/opt/makeme/vendor/stltwalker/src/transform.o: In function `init_transform_rotateZ_f':
/opt/makeme/vendor/stltwalker/src/transform.c:175: undefined reference to `sincosf'
collect2: ld returned 1 exit status
make: *** [stltwalker] Error 1

@jfryman
Copy link
Contributor Author

jfryman commented Feb 5, 2014

/cc @skalnik

This is for Linux compat with make-me.

sshirokov added a commit that referenced this pull request Feb 5, 2014
Move linking LIBS to end of command
@sshirokov sshirokov merged commit dffe277 into sshirokov:master Feb 5, 2014
@jfryman
Copy link
Contributor Author

jfryman commented Feb 5, 2014

🙇

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

Successfully merging this pull request may close these issues.

None yet

2 participants