LLVM GCC (at least i686-apple-darwin11-llvm-gcc-4.2) doesn't generate a
non-inlined version of argp_fmtstream_putc (even if compiled with -O2),
so linking the final program fails:

------------------------------------------------------
Undefined symbols for architecture x86_64:
  "_argp_fmtstream_putc", referenced from:
      _usage_argful_short_opt in argp-help.o
      _argp_args_usage in argp-help.o
ld: symbol(s) not found for architecture x86_64
------------------------------------------------------

FSF GCC doesn't have the problem, BTW.

Signed-off-by: Bernhard Walle <[email protected]>
---
NOTE: This patch applies to ptx branch of mol/localedef, not to PTXdist.

 eglibc/argp/argp-fmtstream.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eglibc/argp/argp-fmtstream.h b/eglibc/argp/argp-fmtstream.h
index f94207a..67d1ea2 100644
--- a/eglibc/argp/argp-fmtstream.h
+++ b/eglibc/argp/argp-fmtstream.h
@@ -203,7 +203,7 @@ extern int __argp_fmtstream_ensure (argp_fmtstream_t __fs, 
size_t __amount);
 #endif
 
 #ifndef ARGP_FS_EI
-#define ARGP_FS_EI extern inline
+#define ARGP_FS_EI extern inline __attribute__ ((always_inline))
 #endif
 
 ARGP_FS_EI size_t
-- 
1.7.9.5


-- 
ptxdist mailing list
[email protected]

Reply via email to