[uClibc]SYMBOL_PREFIX in <features.h>

Miles Bader miles at lsi.nec.co.jp
Mon May 27 06:08:46 UTC 2002


A recent change in <features.h> added the following #ifdef:

+#  if defined(__H8300H__)
+#    define SYMBOL_PREFIX "_"      /* H8/300 Target of add "_" to symbol prefix */

as well as some code below to use it.

There's already some stuff in the top-level Makefile to look for a
`C_SYMBOL_PREFIX' variable (from the Config file), and define a
similarly named cpp macro in uClibc_config.h if found (I added this for
the v850, which also has a confused compiler).

I think the latter approach is preferable, since it avoids dodgy
system-specific #ifdefs in common files, and allows the user to override
it easily if necessary.  The name C_SYMBOL_PREFIX is also arguably
better, as it gives a tiny clue as to what it's referring to...

So, I'd say it would be good to remove the #ifdef and #define from
<features.h>, change the dependent code to use C_SYMBOL_PREFIX, and add
a definition of that variable to the appropiate Config file.

Thanks,

-Miles
-- 
Saa, shall we dance?  (from a dance-class advertisement)



More information about the uClibc mailing list