* [Buildroot] [PATCH 1/1] Makefile: change order of libraries to fix linking issue
@ 2016-02-24 20:55 Eric Limpens
2016-02-24 22:02 ` Arnout Vandecappelle
0 siblings, 1 reply; 2+ messages in thread
From: Eric Limpens @ 2016-02-24 20:55 UTC (permalink / raw)
To: buildroot
When building a static variant, link errors occur. Changing the order
of libsndfile and libm fixes this error
Signed-off-by: Eric Limpens <limpens@gmail.com>
---
package/pifmrds/0003-Makefile-fix-static-link-libm.patch | 15 +++++++++++++++
1 file changed, 15 insertions(+)
create mode 100644 package/pifmrds/0003-Makefile-fix-static-link-libm.patch
diff --git a/package/pifmrds/0003-Makefile-fix-static-link-libm.patch b/package/pifmrds/0003-Makefile-fix-static-link-libm.patch
new file mode 100644
index 0000000..eb9cdcf
--- /dev/null
+++ b/package/pifmrds/0003-Makefile-fix-static-link-libm.patch
@@ -0,0 +1,15 @@
+--- pifmrds-0bf57f9ce0d954365a38d8af8e7be6f28521c3f2.orig/src/Makefile 2016-02-24 10:23:41.455695546 +0100
++++ pifmrds-0bf57f9ce0d954365a38d8af8e7be6f28521c3f2/src/Makefile 2016-02-24 10:25:07.003876714 +0100
+@@ -1,10 +1,10 @@
+ CC = gcc
+
+ app: rds.o waveforms.o pi_fm_rds.o fm_mpx.o control_pipe.o
+- $(CC) $(LDFLAGS) -o pi_fm_rds rds.o waveforms.o pi_fm_rds.o fm_mpx.o control_pipe.o -lm -lsndfile
++ $(CC) $(LDFLAGS) -o pi_fm_rds rds.o waveforms.o pi_fm_rds.o fm_mpx.o control_pipe.o -lsndfile -lm
+
+ rds_wav: rds.o waveforms.o rds_wav.o fm_mpx.o
+- $(CC) $(LDFLAGS) -o rds_wav rds_wav.o rds.o waveforms.o fm_mpx.o -lm -lsndfile
++ $(CC) $(LDFLAGS) -o rds_wav rds_wav.o rds.o waveforms.o fm_mpx.o -lsndfile -lm
+
+ rds.o: rds.c waveforms.h
+ $(CC) $(CFLAGS) rds.c
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Buildroot] [PATCH 1/1] Makefile: change order of libraries to fix linking issue
2016-02-24 20:55 [Buildroot] [PATCH 1/1] Makefile: change order of libraries to fix linking issue Eric Limpens
@ 2016-02-24 22:02 ` Arnout Vandecappelle
0 siblings, 0 replies; 2+ messages in thread
From: Arnout Vandecappelle @ 2016-02-24 22:02 UTC (permalink / raw)
To: buildroot
Hi Eric,
Thanks for your patch.
The subject should be:
<package>: <what changed>
so in this case:
pifmrds: fix static linking
On 02/24/16 21:55, Eric Limpens wrote:
> When building a static variant, link errors occur. Changing the order
> of libsndfile and libm fixes this error
Add a reference to the autobuild failure.
>
> Signed-off-by: Eric Limpens <limpens@gmail.com>
> ---
> package/pifmrds/0003-Makefile-fix-static-link-libm.patch | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
> create mode 100644 package/pifmrds/0003-Makefile-fix-static-link-libm.patch
>
> diff --git a/package/pifmrds/0003-Makefile-fix-static-link-libm.patch b/package/pifmrds/0003-Makefile-fix-static-link-libm.patch
> new file mode 100644
> index 0000000..eb9cdcf
> --- /dev/null
> +++ b/package/pifmrds/0003-Makefile-fix-static-link-libm.patch
> @@ -0,0 +1,15 @@
The patch should contain an explanation, just like a commit log. It should also
have your Signed-off-by.
Also, because upstream uses git, it's convenient to have the patches in git
format. It would also be convenient if you could try to upstream the patches, so
then they should obviously be git-formatted.
> +--- pifmrds-0bf57f9ce0d954365a38d8af8e7be6f28521c3f2.orig/src/Makefile 2016-02-24 10:23:41.455695546 +0100
> ++++ pifmrds-0bf57f9ce0d954365a38d8af8e7be6f28521c3f2/src/Makefile 2016-02-24 10:25:07.003876714 +0100
> +@@ -1,10 +1,10 @@
> + CC = gcc
> +
> + app: rds.o waveforms.o pi_fm_rds.o fm_mpx.o control_pipe.o
> +- $(CC) $(LDFLAGS) -o pi_fm_rds rds.o waveforms.o pi_fm_rds.o fm_mpx.o control_pipe.o -lm -lsndfile
> ++ $(CC) $(LDFLAGS) -o pi_fm_rds rds.o waveforms.o pi_fm_rds.o fm_mpx.o control_pipe.o -lsndfile -lm
Not for you Eric, but:
I was going to suggest to use pkg-config here, but it turns out that libsndfile
itself forgets to add -lm to Libs.private, so that wouldn't help...
Regards,
Arnout
> +
> + rds_wav: rds.o waveforms.o rds_wav.o fm_mpx.o
> +- $(CC) $(LDFLAGS) -o rds_wav rds_wav.o rds.o waveforms.o fm_mpx.o -lm -lsndfile
> ++ $(CC) $(LDFLAGS) -o rds_wav rds_wav.o rds.o waveforms.o fm_mpx.o -lsndfile -lm
> +
> + rds.o: rds.c waveforms.h
> + $(CC) $(CFLAGS) rds.c
>
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-02-24 22:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-24 20:55 [Buildroot] [PATCH 1/1] Makefile: change order of libraries to fix linking issue Eric Limpens
2016-02-24 22:02 ` Arnout Vandecappelle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox