- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Distinguishing the bundled and optional C compiler...
Operating System - Linux
1753425
Members
5274
Online
108793
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-14-2008 01:11 PM
тАО03-14-2008 01:11 PM
I'm working on the C compiler identification
section of a "configure" script.
On all systems, I can use the __hpux macro to
identify HP-UX.
On old PA-RISC systems, I can use __HP_cc to
distinguish between the bundled and optional C
compilers.
On IA64 systems, __HP_cc is defined even with
the bundled C compiler.
Is there a reliable macro I can use for this on
IA64, or do I need to start scanning stderr for
"(Bundled)" when I try to use some exotic
feature (in the code or on the command line)?
For example:
dy # uname -a
HP-UX dy B.11.11 U 9000/785 2012616114 unlimited-user license
dy # cat cct.c
#include
main()
{
#ifdef __hpux
printf( " __hpux\n");
#endif /* def __hpux */
#ifdef __HP_cc
printf( " __HP_cc\n");
#endif /* def __HP_cc */
}
dy # cc -o cct cct.c
dy # ./cct
__hpux
dy #
dyi # uname -a
HP-UX dyi B.11.31 U ia64 4235313755 unlimited-user license
dyi # cc -o cct cct.c
dyi # ./cct
__hpux
__HP_cc
dyi #
section of a "configure" script.
On all systems, I can use the __hpux macro to
identify HP-UX.
On old PA-RISC systems, I can use __HP_cc to
distinguish between the bundled and optional C
compilers.
On IA64 systems, __HP_cc is defined even with
the bundled C compiler.
Is there a reliable macro I can use for this on
IA64, or do I need to start scanning stderr for
"(Bundled)" when I try to use some exotic
feature (in the code or on the command line)?
For example:
dy # uname -a
HP-UX dy B.11.11 U 9000/785 2012616114 unlimited-user license
dy # cat cct.c
#include
main()
{
#ifdef __hpux
printf( " __hpux\n");
#endif /* def __hpux */
#ifdef __HP_cc
printf( " __HP_cc\n");
#endif /* def __HP_cc */
}
dy # cc -o cct cct.c
dy # ./cct
__hpux
dy #
dyi # uname -a
HP-UX dyi B.11.31 U ia64 4235313755 unlimited-user license
dyi # cc -o cct cct.c
dyi # ./cct
__hpux
__HP_cc
dyi #
Solved! Go to Solution.
- Tags:
- bundled_cc
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-14-2008 03:38 PM
тАО03-14-2008 03:38 PM
Solution
It's very simple, the bundled C compiler is in /usr/ccs/bin/cc_bundled.
The fully functional compiler is in /opt/aCC/bin/cc on IPF and /opt/ansic/bin/cc on PA.
>Is there a reliable macro I can use for this on IA64, or do I need to start scanning stderr for "(Bundled)" when I try to use some exotic feature
Since you aren't suppose to be using the bundled C compiler, there is no easy way to tell the difference. So other than maintaining a list of values for __HP_cc, you'll have to look for "(Bundled)".
>On old PA-RISC systems, I can use __HP_cc
This probably won't work on 11.31.
The fully functional compiler is in /opt/aCC/bin/cc on IPF and /opt/ansic/bin/cc on PA.
>Is there a reliable macro I can use for this on IA64, or do I need to start scanning stderr for "(Bundled)" when I try to use some exotic feature
Since you aren't suppose to be using the bundled C compiler, there is no easy way to tell the difference. So other than maintaining a list of values for __HP_cc, you'll have to look for "(Bundled)".
>On old PA-RISC systems, I can use __HP_cc
This probably won't work on 11.31.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-14-2008 07:52 PM
тАО03-14-2008 07:52 PM
Re: Distinguishing the bundled and optional C compilers
> [...] you aren't suppose[d] to be using the
> bundled C compiler [...]
Who supposes that? Someone who knows me not
well?
> >On old PA-RISC systems, I can use __HP_cc
> This probably won't work on 11.31.
Sure enough. Well, fine. I'll just look for
"(Bundled)" then. Thanks.
> bundled C compiler [...]
Who supposes that? Someone who knows me not
well?
> >On old PA-RISC systems, I can use __HP_cc
> This probably won't work on 11.31.
Sure enough. Well, fine. I'll just look for
"(Bundled)" then. Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-14-2008 07:53 PM
тАО03-14-2008 07:53 PM
Re: Distinguishing the bundled and optional C compilers
.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP