public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH v2] utils: sctp: Fix build for prefixed architectures
@ 2013-12-13 12:31 Markos Chandras
  2013-12-16  6:58 ` Mike Frysinger
  2014-01-09 11:53 ` chrubis
  0 siblings, 2 replies; 8+ messages in thread
From: Markos Chandras @ 2013-12-13 12:31 UTC (permalink / raw)
  To: ltp-list

Commit 6f22494d19b605ded308dc0fa713e91cb873f44a
"Move sctp to utils and bump it to 1.0.15"

introduced a build failure for the prefixed architectures.
We need to take into consideration the __USER_LABEL_PREFIX__
for architectures that define it when creating symbol aliases.

The following upstream patch (0600c8968cc2dea04cbf13ec739216e2939d08fe)
fixes the build for the Meta(metag) architecture

[...]
utils/sctp/func_tests/test_connectx.c:151: undefined reference to `_sctp_connectx'
utils/sctp/func_tests/test_connectx.c:163: undefined reference to `_sctp_connectx'
[...]

Build tested on x86_64 and metag.

Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
---
Upstream:
https://github.com/borkmann/lksctp-tools/commit/0600c8968cc2dea04cbf13ec739216e2939d08fe
---
 utils/sctp/lib/connectx.c | 11 +++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/utils/sctp/lib/connectx.c b/utils/sctp/lib/connectx.c
index 50cf4c8..8e5a1f8 100644
--- a/utils/sctp/lib/connectx.c
+++ b/utils/sctp/lib/connectx.c
@@ -179,7 +179,10 @@ int sctp_connectx3(int fd, struct sockaddr *addrs, int addrcnt,
 	return __connectx(fd, addrs, addrs_size, id);
 }
 
-__asm__(".symver __sctp_connectx, sctp_connectx@");
-__asm__(".symver sctp_connectx_orig, sctp_connectx@VERS_1");
-__asm__(".symver sctp_connectx2, sctp_connectx@VERS_2");
-__asm__(".symver sctp_connectx3, sctp_connectx@@VERS_3");
+#define __SYMPFX(pfx, sym) #pfx sym
+#define _SYMPFX(pfx, sym) __SYMPFX(pfx, sym)
+#define SYMPFX(sym) _SYMPFX(__USER_LABEL_PREFIX__, #sym)
+#define SYMVER(name, name2) __asm__(".symver " SYMPFX(name) "," SYMPFX(name2))
+
+SYMVER(__sctp_connectx, sctp_connectx@);
+SYMVER(sctp_connectx_orig, sctp_connectx@VERS_1);
+SYMVER(sctp_connectx2, sctp_connectx@VERS_2);
+SYMVER(sctp_connectx3, sctp_connectx@@VERS_3);
-- 
1.8.5.1



------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

end of thread, other threads:[~2014-01-13 18:54 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-13 12:31 [LTP] [PATCH v2] utils: sctp: Fix build for prefixed architectures Markos Chandras
2013-12-16  6:58 ` Mike Frysinger
2013-12-20 12:45   ` Markos Chandras
2014-01-05 22:30     ` Mike Frysinger
2014-01-08 13:30       ` chrubis
     [not found]         ` <201401081644.28915.vapier@gentoo.org>
2014-01-09 11:57           ` chrubis
2014-01-09 11:53 ` chrubis
     [not found]   ` <52CE9B15.4070307@imgtec.com>
     [not found]     ` <52CFC57F.9000004@imgtec.com>
2014-01-13 18:54       ` chrubis

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