Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: will netbsd be sticking with gcc?



On Wed, 16 Jul 2014, thor0505%comcast.net@localhost wrote:
Additionally, I have successfully gotten tinyCC (Fabrice Bellard's C99 compiler) to compile successfully by defining __NETBSD__ as a platform. However, it is currently unable to compile executables because NetBSD isn't aware internally that tinyCC can perform ELF symbol renaming:
[...]
/usr/include/sys/cdefs.h:375: error: #error "No function renaming possible"

cdefs.h is likely to need a lot of work to support a new compiler. Almost all used of __GNUC__ would need to be checked. If you are able
to do the work and submit a clean set of patches, then I think it's
likely that the patches would be accepted.

The particular error you reported comes from these lines (though you have different line numbers from me):

407 #if !defined(_STANDALONE) && !defined(_KERNEL)
408 #if defined(__GNUC__) || defined(__PCC__)
409 #define __RENAME(x)     ___RENAME(x)
410 #elif defined(__lint__)
411 #define __RENAME(x)     __symbolrename(x)
412 #else
413 #error "No function renaming possible"
414 #endif /* __GNUC__ */
415 #else /* _STANDALONE || _KERNEL */
416 #define __RENAME(x)     no renaming in kernel or standalone environment
417 #endif

You'd obviously need to add some code for "#elif defined(__NEW_COMPILER__)" and "#define __RENAME(x) whatever_the_new_compiler_needs". Similarly for many other macros.

--apb (Alan Barrett)


Home | Main Index | Thread Index | Old Index