Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] espeak: fix build on sparc64
@ 2015-11-27 14:24 Thomas Petazzoni
  2015-11-27 14:35 ` Gustavo Zacarias
  2015-11-27 18:49 ` Peter Korsgaard
  0 siblings, 2 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2015-11-27 14:24 UTC (permalink / raw)
  To: buildroot

sparc64 needs object files to be built with -fPIC in order to be
usable in shared libraries, otherwise the shared library cannot be
created.

Fixes:

  http://autobuild.buildroot.org/results/8b8/8b894f0bd42c18e7cda98c15480757f10d743423/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 ...f-shared-library-on-architectures-needing.patch | 31 ++++++++++++++++++++++
 1 file changed, 31 insertions(+)
 create mode 100644 package/espeak/0001-Fix-build-of-shared-library-on-architectures-needing.patch

diff --git a/package/espeak/0001-Fix-build-of-shared-library-on-architectures-needing.patch b/package/espeak/0001-Fix-build-of-shared-library-on-architectures-needing.patch
new file mode 100644
index 0000000..2590e15
--- /dev/null
+++ b/package/espeak/0001-Fix-build-of-shared-library-on-architectures-needing.patch
@@ -0,0 +1,31 @@
+From 08a464e2b6bd31bb2bf4e258ebfa9b9d65805abf Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Date: Fri, 27 Nov 2015 15:17:02 +0100
+Subject: [PATCH] Fix build of shared library on architectures needing -fPIC
+
+Certain architectures, like Sparc and Sparc64 require objects to be
+built with -fPIC (and not just -fpic) to be usable in shared
+libraries. On other architectures, -fPIC is the same as -fpic so this
+patch doesn't affect such architectures.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ src/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/Makefile b/src/Makefile
+index 95fe549..c293611 100755
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -110,7 +110,7 @@ $(BIN2_NAME): $(OBJS3) $(LIB_NAME)
+ 
+ 
+ x_%.o: %.cpp
+-	$(CXX) $(CXXFLAGS) $(USE_AUDIO) -D PATH_ESPEAK_DATA=\"$(DATADIR)\" -Wall -fpic -fvisibility=hidden -pedantic \
++	$(CXX) $(CXXFLAGS) $(USE_AUDIO) -D PATH_ESPEAK_DATA=\"$(DATADIR)\" -Wall -fPIC -fvisibility=hidden -pedantic \
+ 	-I. -D LIBRARY -c -fno-exceptions  $<  -o x_$*.o
+ 
+ $(LIB_NAME): $(OBJS2)
+-- 
+2.6.3
+
-- 
2.6.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] espeak: fix build on sparc64
  2015-11-27 14:24 [Buildroot] [PATCH] espeak: fix build on sparc64 Thomas Petazzoni
@ 2015-11-27 14:35 ` Gustavo Zacarias
  2015-11-27 15:19   ` Thomas Petazzoni
  2015-11-27 18:49 ` Peter Korsgaard
  1 sibling, 1 reply; 4+ messages in thread
From: Gustavo Zacarias @ 2015-11-27 14:35 UTC (permalink / raw)
  To: buildroot

On 27/11/15 11:24, Thomas Petazzoni wrote:

> sparc64 needs object files to be built with -fPIC in order to be
> usable in shared libraries, otherwise the shared library cannot be
> created.
>
> Fixes:
>
>    http://autobuild.buildroot.org/results/8b8/8b894f0bd42c18e7cda98c15480757f10d743423/

Hi.
I wonder if all these sparc fixes wouldn't be better suited for the 
wrapper, after all -fpic in sparc is generally useless, and try to 
handle these upstream would be a PITA.
Regards.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] espeak: fix build on sparc64
  2015-11-27 14:35 ` Gustavo Zacarias
@ 2015-11-27 15:19   ` Thomas Petazzoni
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2015-11-27 15:19 UTC (permalink / raw)
  To: buildroot

Gustavo,

On Fri, 27 Nov 2015 11:35:27 -0300, Gustavo Zacarias wrote:

> I wonder if all these sparc fixes wouldn't be better suited for the 
> wrapper, after all -fpic in sparc is generally useless, and try to 
> handle these upstream would be a PITA.

This is indeed another possibility. Generally speaking, I am not a huge
fan of hiding too much magic/sorcery in the wrapper. But it's already a
big amount of black magic, so a little bit more or less maybe does not
hurt that much.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] espeak: fix build on sparc64
  2015-11-27 14:24 [Buildroot] [PATCH] espeak: fix build on sparc64 Thomas Petazzoni
  2015-11-27 14:35 ` Gustavo Zacarias
@ 2015-11-27 18:49 ` Peter Korsgaard
  1 sibling, 0 replies; 4+ messages in thread
From: Peter Korsgaard @ 2015-11-27 18:49 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 > sparc64 needs object files to be built with -fPIC in order to be
 > usable in shared libraries, otherwise the shared library cannot be
 > created.

 > Fixes:

 >   http://autobuild.buildroot.org/results/8b8/8b894f0bd42c18e7cda98c15480757f10d743423/

 > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-11-27 18:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-27 14:24 [Buildroot] [PATCH] espeak: fix build on sparc64 Thomas Petazzoni
2015-11-27 14:35 ` Gustavo Zacarias
2015-11-27 15:19   ` Thomas Petazzoni
2015-11-27 18:49 ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox