Date: Wed, 2 Sep 1998 00:55:29 -0500 (CDT) From: Joel Ray Holveck <joelh@gnu.org> To: joki@kuebart.stuttgart.netsurf.de Cc: joki@kuebart.stuttgart.netsurf.de, joki@shire.domestic.de, galatalt@stuy.edu, dfr@nlsystems.com, freebsd-current@FreeBSD.ORG Subject: Re: XFree86 and ELF Message-ID: <199809020555.AAA04314@detlev.UUCP> In-Reply-To: <199809020541.HAA01432@yacht.domestic.de> (message from Joachim Kuebart on Wed, 2 Sep 1998 07:41:18 %2B0200 (CEST)) References: <199809020541.HAA01432@yacht.domestic.de>
next in thread | previous in thread | raw e-mail | index | archive | help
>>> This is due to the fact that I am unaware of a portable way to check >>> if we're on an ELF system. Bear in mind it might be a prehistoric >>> -stable version, so it isn't just a question of `objformat`. >> Am I confused? What's wrong with looking for #ifdef __ELF__ ? > The files being discussed are processed by cpp. __ELF__ if set only > when cpp is called from the compiler front end cc. What if you use cc -E instead? I've seen many shell tests, so I may as well add my own, which doesn't depend on our ELF's current idiosyncrasies quite as much (suitable mechanisms should be substituted for printf if non-BSD usability is desired): VAR=`printf '#ifdef __ELF__\nelf\n#else\na.out\n#endif' | cc -P -E -` Happy hacking, joelh -- Joel Ray Holveck - joelh@gnu.org - http://www.wp.com/piquan Fourth law of programming: Anything that can go wrong wi sendmail: segmentation violation - core dumped To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199809020555.AAA04314>