source: mainline/uspace/app/pcc/config.h@ fdf97f6

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since fdf97f6 was fdf97f6, checked in by Vojtech Horky <vojtechhorky@…>, 12 years ago

Libposix functions are without posix_ prefix

Prior this commit, libposix headers declared all functions as posix_*
and used macros to rename e.g. strncpy to posix_strncpy in all (ported)
sources.

After this change, libposix headers look as normal POSIX compliant headers
(well, almost) and no renaming is done in the source codei (of the ported
applications). Instead, the renaming is done at object files level to
bypass weird problems that are bound to happen if you use macros.

The scheme is following. libposix headers use special macro to declare
the names. When included from outside, the functions have their normal
(standard) names. When included from the libposix sources, posix_ prefix
is added. Thus, when libposix is compiled and linked, it contains the
posix_* naming while compiling of ported software uses the normal
non-prefixed versions. This way the posix_* can use HelenOS libc without
any problem. Before linking, the posix_* prefix is removed from all
symbols and special prefix helenos_libc_ is added to all functions
that exists in our (HelenOS) libc and its name clashes with the POSIX
one.

The following happens, for example, to the open() function that exists in
both libposix and in libc.

  • Headers and sources of libc are left intact.
  • Copy of libc.a is made and to all clashing functions is added the helenos_libc prefix. This library is called libc4posix.a.
  • POSIX_DEF(open)(const char *) is used in libposix headers. This macro expands to plain open when included from the "outside world". But it expands to posix_open when included from libposix sources.
  • Libposix is compiled and linked, containing posix_open() that internally calls open() [the original one from libc].
  • Libposix is transformed - all open() are replaced with prefix variant: helenos_libc_open() and all posix_open() are replaced with open(). The transformed library is stored as libposixaslibc.a

Binutils and PCC are then linked with libc4posix and libposixaslibc
libraries instead of libc and libposix as was done previously.

WARNING: it looks that binutils, PCC and MSIM still works but not all
architectures were tested.

  • Property mode set to 100644
File size: 4.2 KB
Line 
1/* Hard-coded, because wiring up configure script would just not be worth the effort. */
2
3/* Using a.out ABI */
4//#undef AOUTABI
5
6/* Define path to alternate assembler */
7#define ASSEMBLER "/app/as"
8
9/* Using Classic 68k ABI */
10//#undef CLASSIC68K
11
12/* Using COFF ABI */
13//#undef COFFABI
14
15/* Define path to alternate compiler */
16//#undef COMPILER
17
18/* Using ECOFF ABI */
19//#undef ECOFFABI
20
21/* Using ELF ABI */
22#define ELFABI 1
23
24/* Define to 1 if you have the `basename' function. */
25//#define HAVE_BASENAME 1
26
27/* Define to 1 if printf supports C99 size specifiers */
28//#define HAVE_C99_FORMAT 1
29
30/* Define to 1 if your compiler supports C99 variadic macros */
31#define HAVE_CPP_VARARG_MACRO_GCC 1
32
33/* Define to 1 if you have the `ffs' function. */
34#define HAVE_FFS 1
35
36/* Define to 1 if you have the `getopt' function. */
37#define HAVE_GETOPT 1
38
39/* Define to 1 if you have the <inttypes.h> header file. */
40#define HAVE_INTTYPES_H 1
41
42/* Define to 1 if you have the <libgen.h> header file. */
43//#define HAVE_LIBGEN_H 1
44
45/* Define to 1 if you have the <malloc.h> header file. */
46#define HAVE_MALLOC_H 1
47
48/* Define to 1 if you have the <memory.h> header file. */
49#define HAVE_MEMORY_H 1
50
51/* Define to 1 if you have the `mkstemp' function. */
52#define HAVE_MKSTEMP 1
53
54/* Define to 1 if you have the `snprintf' function. */
55#define HAVE_SNPRINTF 1
56
57/* Define to 1 if you have the <stdint.h> header file. */
58#define HAVE_STDINT_H 1
59
60/* Define to 1 if you have the <stdlib.h> header file. */
61#define HAVE_STDLIB_H 1
62
63/* Define to 1 if you have the <strings.h> header file. */
64#define HAVE_STRINGS_H 1
65
66/* Define to 1 if you have the <string.h> header file. */
67#define HAVE_STRING_H 1
68
69/* Define to 1 if you have the `strlcat' function. */
70//#define HAVE_STRLCAT 1
71
72/* Define to 1 if you have the `strlcpy' function. */
73//#define HAVE_STRLCPY 1
74
75/* Define to 1 if you have the `strtold' function. */
76#define HAVE_STRTOLD 1
77
78/* Define to 1 if you have the <sys/stat.h> header file. */
79#define HAVE_SYS_STAT_H 1
80
81/* Define to 1 if you have the <sys/types.h> header file. */
82#define HAVE_SYS_TYPES_H 1
83
84/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
85//#define HAVE_SYS_WAIT_H 1
86
87/* Define to 1 if you have the <unistd.h> header file. */
88#define HAVE_UNISTD_H 1
89
90/* Define to 1 if you have the `vfork' function. */
91//#define HAVE_VFORK 1
92
93/* Define to 1 if you have the `vsnprintf' function. */
94#define HAVE_VSNPRINTF 1
95
96#ifdef __BE__
97 /* Define if host is BIG endian */
98 #define HOST_BIG_ENDIAN
99 /* Define if target defaults to BIG endian */
100 #undef TARGET_BIG_ENDIAN
101#endif
102
103#ifdef __LE__
104 /* Define if host is LITTLE endian */
105 #define HOST_LITTLE_ENDIAN
106 /* Define if target defaults to LITTLE endian */
107 #define TARGET_LITTLE_ENDIAN
108#endif
109
110/* lex is flex */
111#define ISFLEX 1
112
113/* Define alternate standard lib directory */
114#define LIBDIR "/lib/"
115
116/* Define path to alternate linker */
117#define LINKER "/app/ld"
118
119/* Using Mach-O ABI */
120//#undef MACHOABI
121
122/* Define to the address where bug reports for this package should be sent. */
123#define PACKAGE_BUGREPORT "<zarevucky.jiri@gmail.com>"
124
125/* Define to the full name of this package. */
126#define PACKAGE_NAME "pcc"
127
128/* Define to the full name and version of this package. */
129#define PACKAGE_STRING "pcc 1.0.0.RELEASE"
130
131/* Define to the one symbol short name of this package. */
132#define PACKAGE_TARNAME "pcc"
133
134/* Define to the version of this package. */
135#define PACKAGE_VERSION "1.0.0.RELEASE"
136
137/* Major version no */
138#define PCC_MAJOR 1
139
140/* Minor version no */
141#define PCC_MINOR 0
142
143/* Minor minor version no */
144#define PCC_MINORMINOR 0
145
146/* Using PE/COFF ABI */
147//#undef PECOFFABI
148
149/* Define path to alternate preprocessor */
150#undef PREPROCESSOR
151
152/* Define to 1 if you have the ANSI C header files. */
153#define STDC_HEADERS 1
154
155/* Define alternate standard include directory */
156#define STDINC "/inc/c"
157
158
159/* Target OS */
160#define TARGOS helenos
161
162/* Target OS version */
163#define TARGOSVER 0
164
165/* Enable thread-local storage (TLS). */
166#define TLS 1
167
168/* Version string */
169#define VERSSTR "pcc 1.0.0.RELEASE 20110221 for HelenOS"
170
171/* Size of wide character type */
172#define WCHAR_SIZE 4
173
174/* Type to use for wide characters */
175#define WCHAR_TYPE INT
176
177/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
178 `char[]'. */
179//#define YYTEXT_POINTER 1
180
181#undef COMPILER
182
Note: See TracBrowser for help on using the repository browser.