aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/s/freebsd.h29
1 files changed, 28 insertions, 1 deletions
diff --git a/src/s/freebsd.h b/src/s/freebsd.h
index 1a04cf0f56a..114265b8fd0 100644
--- a/src/s/freebsd.h
+++ b/src/s/freebsd.h
@@ -1,5 +1,15 @@
1/* s/ file for freebsd system. */ 1/* s/ file for freebsd system. */
2 2
3/* Get the correct __FreeBSD_version, even if this is before that was
4 defined. */
5#ifndef __FreeBSD__
6#define __FreeBSD_version 199401
7#elif __FreeBSD__ == 1
8#define __FreeBSD_version 199405
9#else
10#include <osreldate.h>
11#endif
12
3/* '__FreeBSD__' is defined by the preprocessor on FreeBSD-1.1 and up. 13/* '__FreeBSD__' is defined by the preprocessor on FreeBSD-1.1 and up.
4 Earlier versions do not have shared libraries, so inhibit them. 14 Earlier versions do not have shared libraries, so inhibit them.
5 You can inhibit them on newer systems if you wish 15 You can inhibit them on newer systems if you wish
@@ -34,7 +44,6 @@
34#define LIBS_DEBUG 44#define LIBS_DEBUG
35#define LIBS_SYSTEM -lutil 45#define LIBS_SYSTEM -lutil
36#define LIBS_TERMCAP -ltermcap 46#define LIBS_TERMCAP -ltermcap
37#define LIB_GCC -lgcc
38 47
39#define SYSV_SYSTEM_DIR 48#define SYSV_SYSTEM_DIR
40 49
@@ -42,12 +51,28 @@
42#undef BSD_PGRPS 51#undef BSD_PGRPS
43#define GETPGRP_NO_ARG 52#define GETPGRP_NO_ARG
44 53
54#ifdef __ELF__
55
56#define LD_SWITCH_SYSTEM
57#define START_FILES pre-crt0.o /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/crtbegin.o
58#define UNEXEC unexelf.o
59#define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtend.o /usr/lib/crtn.o
60#undef LIB_GCC
61#define LIB_GCC
62
63#else /* not __ELF__ */
64
45#ifndef NO_SHARED_LIBS 65#ifndef NO_SHARED_LIBS
46#define LD_SWITCH_SYSTEM -e start -dc -dp 66#define LD_SWITCH_SYSTEM -e start -dc -dp
47#define HAVE_TEXT_START /* No need to define `start_of_text'. */ 67#define HAVE_TEXT_START /* No need to define `start_of_text'. */
68#if __FreeBSD_version >= 300002
69#define START_FILES pre-crt0.o /usr/lib/aout/crt0.o
70#else /* __FreeBSD_version < 300002 */
48#define START_FILES pre-crt0.o /usr/lib/crt0.o 71#define START_FILES pre-crt0.o /usr/lib/crt0.o
72#endif /* __FreeBSD_version < 300002 */
49#define UNEXEC unexsunos4.o 73#define UNEXEC unexsunos4.o
50#define RUN_TIME_REMAP 74#define RUN_TIME_REMAP
75#define LIB_GCC -lgcc
51 76
52#ifndef N_TRELOFF 77#ifndef N_TRELOFF
53#define N_PAGSIZ(x) __LDPGSZ 78#define N_PAGSIZ(x) __LDPGSZ
@@ -63,6 +88,8 @@
63#endif /* __FreeBSD__ */ 88#endif /* __FreeBSD__ */
64#endif /* NO_SHARED_LIBS */ 89#endif /* NO_SHARED_LIBS */
65 90
91#endif /* not __ELF__ */
92
66#define HAVE_WAIT_HEADER 93#define HAVE_WAIT_HEADER
67#define HAVE_GETLOADAVG 94#define HAVE_GETLOADAVG
68/*#define HAVE_GETPAGESIZE /* configure now puts this in config.h */ 95/*#define HAVE_GETPAGESIZE /* configure now puts this in config.h */