Skip to contentSkip to conversation

openssl: fix m68k uclinux compile

PATCH New Waldemar Brodkorb 3 participants 3 messages Jul 31, 2016 – Aug 4, 2016

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 openssl: fix m68k uclinux compile

The GCC manual suggest when getting:
relocation truncated to fit: R_68K_GOT16O foobar
to use -mxgot.

Fixes:
http://autobuild.buildroot.net/results/455fd0f274bfa4bbd786bcd6740ecf960e47c1bd/

---
 package/openssl/openssl.mk |    5 +++++
 1 file changed, 5 insertions(+)
package/openssl/openssl.mk +5 -0
index e34868e..b926fe3 100644
@@ -19,6 +19,11 @@ OPENSSL_PATCH = \
 	https://gitweb.gentoo.org/repo/gentoo.git/plain/dev-libs/openssl/files/openssl-1.0.2a-parallel-install-dirs.patch?id=c8abcbe8de5d3b6cdd68c162f398c011ff6e2d9d \
 	https://gitweb.gentoo.org/repo/gentoo.git/plain/dev-libs/openssl/files/openssl-1.0.2a-parallel-symlinking.patch?id=c8abcbe8de5d3b6cdd68c162f398c011ff6e2d9d
 
+# relocation truncated to fit: R_68K_GOT16O
+ifeq ($(BR2_m68k_cf),y)
+OPENSSL_CFLAGS += -mxgot
+endif
+
 ifeq ($(BR2_USE_MMU),)
 OPENSSL_CFLAGS += -DHAVE_FORK=0
 endif
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH v2 1/1 openssl: fix m68k uclinux compile

Hello,

Quoted 11 lines · Waldemar Brodkorb

The GCC manual suggest when getting:
relocation truncated to fit: R_68K_GOT16O foobar
to use -mxgot.

Fixes:
http://autobuild.buildroot.net/results/455fd0f274bfa4bbd786bcd6740ecf960e47c1bd/

---
 package/openssl/openssl.mk |    5 +++++
 1 file changed, 5 insertions(+)

It's somewhat annoying that we have to do this manually instead of having the compiler switch automatically to this less efficient mode for handling the GOT. But I guess we don't really have the choice. Let's see how many packages need such a hack.

Applied, thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#2 lore raw

PATCH v2 1/1 openssl: fix m68k uclinux compile

In reply to Waldemar Brodkorb
Quoted 20 lines · Waldemar Brodkorb

The GCC manual suggest when getting:
relocation truncated to fit: R_68K_GOT16O foobar
to use -mxgot.

Fixes:
http://autobuild.buildroot.net/results/455fd0f274bfa4bbd786bcd6740ecf960e47c1bd/

---
package/openssl/openssl.mk | 5 +++++

1 file changed, 5 insertions(+)
package/openssl/openssl.mk +0 -0
index e34868e..b926fe3 100644

package/openssl/openssl.mk OPENSSL_PATCH = \ · line 25

Quoted 7 lines
package/openssl/openssl.mk +4 -0
@@ -19,6 +19,11 @@ OPENSSL_PATCH = \
 	https://gitweb.gentoo.org/repo/gentoo.git/plain/dev-libs/openssl/files/openssl-1.0.2a-parallel-install-dirs.patch?id=c8abcbe8de5d3b6cdd68c162f398c011ff6e2d9d \
 	https://gitweb.gentoo.org/repo/gentoo.git/plain/dev-libs/openssl/files/openssl-1.0.2a-parallel-symlinking.patch?id=c8abcbe8de5d3b6cdd68c162f398c011ff6e2d9d
 
+# relocation truncated to fit: R_68K_GOT16O
+ifeq ($(BR2_m68k_cf),y)
+OPENSSL_CFLAGS += -mxgot
+endif

perhaps -fPIC could be used here instead ?

Quoted 11 lines
package/openssl/openssl.mk +1 -0
+
 ifeq ($(BR2_USE_MMU),)

OPENSSL_CFLAGS += -DHAVE_FORK=0
endif
--
1.7.10.4

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 204 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20160804/b122d82f/attachment.asc>