Changeset 3820
- Timestamp:
- Feb 26, 2014, 1:44:45 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/Config.kmk ¶
r3665 r3820 1 1 # $Id$ 2 2 ## @file 3 #4 3 # Top-level kBuild configuration. 5 4 # 6 # Copyright (c) 2006 knut st. osmundsen <bird@anduin.net> 5 6 # 7 # Copyright (c) 2006-2014 knut st. osmundsen <bird@anduin.net> 7 8 # 8 9 # … … 37 38 38 39 # 40 # Base template. 41 # 42 TEMPLATE_kNIX-base = Base template. 43 ifdef CFG_USE_WATCOM 44 TEMPLATE_kNIX-base_TOOL = OPENWATCOM 45 TEMPLATE_kNIX-base_CFLAGS = -za99 46 else 47 TEMPLATE_kNIX-base_TOOL = GCC3 48 TEMPLATE_kNIX-base_TOOL.os2 = GCC3OMF 49 endif 50 51 52 # 39 53 # The /bin templates. 40 54 # 41 55 TEMPLATE_bin = /bin/ programs. 42 TEMPLATE_bin_TOOL = GCC3 43 TEMPLATE_bin_TOOL.os2 = GCC3OMF 56 TEMPLATE_bin_EXTENDS = kNIX-base 44 57 TEMPLATE_bin_INST = bin/ 45 58 … … 48 61 # 49 62 TEMPLATE_usr.bin = /usr/bin/ programs. 50 TEMPLATE_usr.bin_TOOL = GCC3 51 TEMPLATE_usr.bin_TOOL.os2 = GCC3OMF 63 TEMPLATE_usr.bin_EXTENDS = kNIX-base 52 64 TEMPLATE_usr.bin_INST = usr/bin/ 53 65 … … 66 78 67 79 TEMPLATE_usr.bin.alp = /usr/bin/ libraries using alp as assembler. 68 TEMPLATE_usr.bin.alp_TOOL = GCC3 69 TEMPLATE_usr.bin.alp_TOOL.os2 = GCC3OMF 80 TEMPLATE_usr.bin.alp_EXTENDS = kNIX-base 70 81 TEMPLATE_usr.bin.alp_ASTOOL = ALP 71 82 TEMPLATE_usr.bin.alp_ASFLAGS = -Sv:ALP … … 73 84 74 85 TEMPLATE_usr.bin.nasm = /usr/lib/ libraries using nasm as assembler. 75 TEMPLATE_usr.bin.nasm_TOOL = GCC3 76 TEMPLATE_usr.bin.nasm_TOOL.os2 = GCC3OMF 86 TEMPLATE_usr.bin.nasm_EXTENDS = kNIX-base 77 87 TEMPLATE_usr.bin.nasm_ASTOOL = NASM 78 88 TEMPLATE_usr.bin.nasm_ASFLAGS = -f obj … … 83 93 # 84 94 TEMPLATE_usr.sbin = /usr/sbin/ programs. 85 TEMPLATE_usr.sbin_TOOL = GCC3 86 TEMPLATE_usr.sbin_TOOL.os2 = GCC3OMF 95 TEMPLATE_usr.sbin_EXTENDS = kNIX-base 87 96 TEMPLATE_usr.sbin_INST = usr/sbin/ 88 97 … … 117 126 # 118 127 TEMPLATE_usr.lib = /usr/lib/ libraries. 119 TEMPLATE_usr.lib_TOOL = GCC3 120 TEMPLATE_usr.lib_TOOL.os2 = GCC3OMF 128 TEMPLATE_usr.lib_EXTENDS = kNIX-base 121 129 TEMPLATE_usr.lib_INST = usr/lib/ 122 130 TEMPLATE_usr.lib_MODE = 644 123 131 124 132 TEMPLATE_usr.lib.nasm = /usr/lib/ libraries using nasm as assembler. 125 TEMPLATE_usr.lib.nasm_TOOL = GCC3 126 TEMPLATE_usr.lib.nasm_TOOL.os2 = GCC3OMF 133 TEMPLATE_usr.lib.nasm_EXTENDS = kNIX-base 127 134 TEMPLATE_usr.lib.nasm_ASTOOL = NASM 128 135 TEMPLATE_usr.lib.nasm_ASFLAGS = -f obj -
TabularUnified trunk/libc/Config.kmk ¶
r3629 r3820 60 60 # 61 61 PATH_LIBC_ROOT = $(PATH_ROOT)/libc 62 PATH_LIBC_SRC = $(PATH_LIBC_ROOT)/src 63 PATH_LIBC_INC = $(PATH_LIBC_ROOT)/include 62 PATH_LIBC_SRC = $(PATH_LIBC_ROOT)/src 63 PATH_LIBC_INC = $(PATH_LIBC_ROOT)/include 64 64 65 LIBC-STD.H = $(PATH_OBJ)/libc/libc-std.h 65 66 LIBC_GENALIAS = $(PATH_TARGET)/genalias/genalias$(HOSTSUFF_EXE) 66 67 LIBC_GENALIAS_FORMAT.nt = coff 67 68 ifdef LIBC_GENALIAS_FORMAT.$(BUILD_TARGET) 68 LIBC_GENALIAS_FORMAT := $(LIBC_GENALIAS_FORMAT.$(BUILD_TARGET))69 else 70 LIBC_GENALIAS_FORMAT := aout69 LIBC_GENALIAS_FORMAT := $(LIBC_GENALIAS_FORMAT.$(BUILD_TARGET)) 70 else 71 LIBC_GENALIAS_FORMAT := aout 71 72 endif 72 73 … … 74 75 # Templates 75 76 # 76 TEMPLATE_libc = libc template 77 TEMPLATE_libc_TOOL = GCC3 77 TEMPLATE_libc = libc template 78 TEMPLATE_libc_DEPS = $(LIBC-STD.H) 79 TEMPLATE_libc_INST = usr/lib/ 78 80 TEMPLATE_libc_INCS = $(PATH_LIBC_INC) $(dir $(LIBC-STD.H)) 79 81 TEMPLATE_libc_INCS.nt = $(PATH_LIBC_SRC)/w32api/include 80 TEMPLATE_libc_DEPS = $(LIBC-STD.H) 81 TEMPLATE_libc_INST = usr/lib/ 82 TEMPLATE_libc_CFLAGS = $(TEMPLATE_lib_CFLAGS) -std=gnu99 -Wall -Wundef -Wmissing-prototypes 83 TEMPLATE_libc_CFLAGS.os2 = $(TEMPLATE_lib_CFLAGS.os2) -mstack-arg-probe 84 TEMPLATE_libc_CFLAGS.release = $(TEMPLATE_lib_CFLAGS.release) -O3 -mcpu=pentium 82 if defined(CFG_LIBC_USE_WATCOM) || defined(CFG_KNIX_USE_WATCOM) 83 TEMPLATE_libc_TOOL = OPENWATCOM 84 TEMPLATE_libc_CFLAGS = $(TEMPLATE_lib_CFLAGS) 85 TEMPLATE_libc_CFLAGS.os2 = $(TEMPLATE_lib_CFLAGS.os2) 86 TEMPLATE_libc_CFLAGS.release = $(TEMPLATE_lib_CFLAGS.release) 87 else 88 TEMPLATE_libc_TOOL = GCC3 89 TEMPLATE_libc_CFLAGS = $(TEMPLATE_lib_CFLAGS) -std=gnu99 -Wall -Wundef -Wmissing-prototypes 90 TEMPLATE_libc_CFLAGS.os2 = $(TEMPLATE_lib_CFLAGS.os2) -mstack-arg-probe 91 TEMPLATE_libc_CFLAGS.release = $(TEMPLATE_lib_CFLAGS.release) -O3 -mcpu=pentium 92 endif 85 93 86 94 TEMPLATE_libc.logstrict = . … … 110 118 111 119 TEMPLATE_libcasm = . 112 TEMPLATE_libcasm_TOOL = GCC3 113 TEMPLATE_libcasm_TOOL.os2 = GCC3OMF 120 if defined(CFG_LIBC_USE_WATCOM) || defined(CFG_KNIX_USE_WATCOM) 121 TEMPLATE_libcasm_TOOL = OPENWATCOM 122 else 123 TEMPLATE_libcasm_TOOL = GCC3 124 TEMPLATE_libcasm_TOOL.os2 = GCC3OMF 125 endif 114 126 TEMPLATE_libcasm_INCS = $(PATH_LIBC_INC) $(dir $(LIBC-STD.H)) 115 127 TEMPLATE_libcasm_INST = usr/lib/ … … 147 159 # Only permit #include <include/emx/bigint.h>. 148 160 TEMPLATE_bldprog = Build programs 149 TEMPLATE_bldprog_TOOL = GCC3150 161 TEMPLATE_bldprog_DEFS = __LIBC_BUILD_PROGRAM__ 151 TEMPLATE_bldprog_INCS = $(PATH_LIBC_ROOT) 162 if defined(CFG_LIBC_USE_WATCOM) || defined(CFG_KNIX_USE_WATCOM) 163 TEMPLATE_bldprog_TOOL = OPENWATCOM 164 TEMPLATE_bldprog_INCS = $(TOOL_OPENWATCOM_CXXINCS) $(PATH_LIBC_ROOT) 165 TEMPLATE_bldprog_BLD_TRG_ARCH = x86 166 TEMPLATE_bldprog_CFLAGS = -za99 167 else 168 TEMPLATE_bldprog_TOOL = GCC3 169 TEMPLATE_bldprog_INCS = $(PATH_LIBC_ROOT) 170 endif 152 171 153 172 … … 205 224 $(1)_p_SOURCES.$(BUILD_TARGET_CPU) = $($(1)_SOURCES.$(BUILD_TARGET_CPU)) 206 225 endif # CFG_LIBC_PROFILED_LIBS 207 endef 226 endef # def_libc_variants 208 227 209 228 define def_libc_variants2 -
TabularUnified trunk/libc/include/386/builtin.h ¶
r2781 r3820 16 16 signed char v) 17 17 { 18 #ifdef __WATCOMC__ 19 /** @todo next up */ 20 #else 18 21 __asm__ __volatile__ ("xchgb %0, %1" : "=m"(*p), "=r"(v) : "1"(v)); 22 #endif 19 23 return v; 20 24 } -
TabularUnified trunk/libc/include/386/signal.h ¶
r1574 r3820 131 131 int sc_fpformat; 132 132 int sc_ownedfp; 133 int sc_spare1[1]; 133 int sc_spare1[1+1]; /* bird: added one int here to get the desire alignment.*/ 134 #ifdef __GNUC__ /* bird */ 134 135 int sc_fpstate[128] __aligned(16); 136 #else 137 int sc_fpstate[128]; 138 #endif 135 139 int sc_spare2[8]; 136 140 }; 141 142 _Static_assert(!(__offsetof(struct sigcontext, sc_fpstate) & 15),); /* bird */ 143 137 144 138 145 #define sc_sp sc_esp -
TabularUnified trunk/libc/include/sys/cdefs.h ¶
r3819 r3820 8 8 * @changed bird: __offsetof__ was apparently introduced in gcc 3.4.x. 9 9 */ 10 10 11 11 /*- 12 12 * Copyright (c) 1991, 1993 … … 126 126 127 127 /* 128 * Compiler checks for MSC and OpenWatcom. (bird) 129 */ 130 #ifdef __WATCOMC__ 131 # define __KLIBC_WATCOM_PREREQ(ma, mi) (__WATCOMC__ >= (ma)*10 + (mi)) 132 #else 133 # define __KLIBC_WATCOM_PREREQ(ma, mi) 0 134 #endif 135 136 #ifdef _MSC_VER 137 # define __KLIBC_MSVC_PREREQ(ma, mi) (_MSC_VER >= (ma)*100 + (mi)*10) 138 #else 139 # define __KLIBC_MSVC_PREREQ(ma, mi) 0 140 #endif 141 /* bird - end: Compiler checks for MSC and OpenWatcom. */ 142 143 /* 128 144 * The __CONCAT macro is used to concatenate parts of symbol names, e.g. 129 145 * with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. … … 318 334 319 335 /* XXX: should use `#if __STDC_VERSION__ < 199901'. */ 320 #if !__GNUC_PREREQ__(2, 7) && !defined(__INTEL_COMPILER) 336 #if !__GNUC_PREREQ__(2, 7) && !defined(__INTEL_COMPILER) && !defined(__WATCOMC__) /* bird: Watcom */ 321 337 #define __func__ NULL 322 338 #endif -
TabularUnified trunk/libc/src/fbsdlibc/db/db/db.c ¶
r1694 r3820 57 57 58 58 #define DB_FLAGS (DB_LOCK | DB_SHMEM | DB_TXN) 59 #ifdef __ EMX__ /* TODO: add the missing flags! */59 #ifdef __IN_KLIBC__ /* TODO: add the missing flags! */ 60 60 #define USE_OPEN_FLAGS \ 61 61 (O_CREAT | O_EXCL /*| O_EXLOCK*/ | O_NONBLOCK | O_RDONLY | \ -
TabularUnified trunk/libc/src/fbsdlibc/db/recno/rec_close.c ¶
r976 r3820 41 41 #include <sys/types.h> 42 42 #include <sys/uio.h> 43 #if ndef __EMX__43 #if !defined(__IN_KLIBC__) || !defined(__OS2__) 44 44 #include <sys/mman.h> 45 45 #endif … … 83 83 /* Committed to closing. */ 84 84 status = RET_SUCCESS; 85 #if ndef __EMX__85 #if !defined(__IN_KLIBC__) || !defined(__OS2__) 86 86 if (F_ISSET(t, R_MEMMAPPED) && munmap(t->bt_smap, t->bt_msize)) 87 87 status = RET_ERROR; -
TabularUnified trunk/libc/src/fbsdlibc/gdtoa/gdtoaimp.h ¶
r1871 r3820 178 178 #ifndef GDTOAIMP_H_INCLUDED 179 179 #define GDTOAIMP_H_INCLUDED 180 #ifdef __ EMX__180 #ifdef __IN_KLIBC__ 181 181 #include "namespace.h" 182 182 #endif … … 194 194 195 195 #include "namespace.h" 196 #ifdef __ EMX__196 #ifdef __IN_KLIBC__ 197 197 #include <386/builtin.h> 198 198 #include <sys/fmutex.h> 199 #else /* !__ EMX__ */199 #else /* !__IN_KLIBC__ */ 200 200 #include <pthread.h> 201 #endif /* !__ EMX__ */201 #endif /* !__IN_KLIBC__ */ 202 202 #include "un-namespace.h" 203 203 … … 478 478 479 479 #define MULTIPLE_THREADS 480 #ifdef __ EMX__480 #ifdef __IN_KLIBC__ 481 481 extern _fmutex __libc_gdtoa_locks[2]; 482 482 #define ACQUIRE_DTOA_LOCK(n) do { \ … … 488 488 _fmutex_checked_release(&__libc_gdtoa_locks[n]); \ 489 489 } while(0) 490 #else /* !__ EMX__ */490 #else /* !__IN_KLIBC__ */ 491 491 extern pthread_mutex_t __gdtoa_locks[2]; 492 492 #define ACQUIRE_DTOA_LOCK(n) do { \ … … 498 498 _pthread_mutex_unlock(&__gdtoa_locks[n]); \ 499 499 } while(0) 500 #endif /* !__ EMX__ */500 #endif /* !__IN_KLIBC__ */ 501 501 502 502 #define Kmax 15 … … 651 651 extern int strtodg ANSI((CONST char*, char**, FPI*, Long*, ULong*)); 652 652 653 #ifdef __ EMX__653 #ifdef __IN_KLIBC__ 654 654 extern char* g_ddfmt ANSI((char*, double*, int, unsigned)); 655 655 extern char* g_dfmt ANSI((char*, double*, int, unsigned)); … … 658 658 extern char* g_xfmt ANSI((char*, void*, int, unsigned)); 659 659 extern char* g_xLfmt ANSI((char*, void*, int, unsigned)); 660 #endif /* __ EMX__ */660 #endif /* __IN_KLIBC__ */ 661 661 662 662 extern int strtoId ANSI((CONST char *, char **, double *, double *)); -
TabularUnified trunk/libc/src/genalias/genalias.c ¶
r2717 r3820 1 1 /* $Id: $ */ 2 2 /** @file 3 *4 3 * genalias - generate a number of alias objects. 5 * 6 * Copyright (c) 2006 knut st. osmundsen <bird@innotek.de> 4 */ 5 6 /* 7 * Copyright (c) 2006-2014 knut st. osmundsen <bird@innotek.de> 7 8 * 8 9 * … … 32 33 #include <stdio.h> 33 34 #include <stdint.h> 35 #include <string.h> 34 36 #include <time.h> 35 37 #include <assert.h> … … 188 190 #define IMAGE_WEAK_EXTERN_SEARCH_ALIAS 3 189 191 assert(sizeof(Hdr) == 20); assert(sizeof(Sym) == 18); assert(sizeof(Aux) == sizeof(Sym)); 190 #pragma pack( )192 #pragma pack(0) 191 193 const size_t cchAlias = strlen(pszAlias); 192 194 const size_t cchReal = strlen(pszReal); -
TabularUnified trunk/libc/src/libc/conv/makepow5.c ¶
r2682 r3820 3 3 #include <stdio.h> 4 4 #include <stdlib.h> 5 #include < getopt.h>5 #include <string.h> 6 6 #include "include/emx/bigint.h" 7 7 … … 25 25 26 26 27 static voidusage (void)27 static int usage (void) 28 28 { 29 29 puts ("makepow5 -- Copyright (c) 1996 by Eberhard Mattes\n"); 30 30 puts ("Usage:"); 31 31 puts (" makepow5 [-o <output_file>] [-s] [-m <threshold>] <max_exponent>"); 32 exit (1);32 return 1; 33 33 } 34 34 … … 238 238 int main (int argc, char *argv[]) 239 239 { 240 int c;240 int iArg; 241 241 char *end; 242 242 243 while ((c = getopt (argc, argv, "m:o:s")) != -1)244 switch (c)243 for (iArg = 1; iArg < argc; iArg++) 244 if (argv[iArg][0] != '-') 245 245 { 246 case 'm': 247 long_mul_threshold = strtol (optarg, &end, 10); 248 if (long_mul_threshold < 1 || *end != 0) 249 usage (); 250 break; 251 252 case 'o': 253 out_fname = optarg; 254 break; 255 256 case 's': 257 single_prec = 1; 258 break; 259 260 default: 261 usage (); 246 if (max_exponent) 247 return usage (); 248 max_exponent = strtol (argv[iArg], &end, 10); 249 if (max_exponent < 1 || *end != 0) 250 return usage (); 262 251 } 263 264 if (argc - optind != 1) 265 usage (); 266 267 max_exponent = strtol (argv[optind], &end, 10); 268 if (max_exponent < 1 || *end != 0) 269 usage (); 252 else 253 { 254 int c = argv[iArg][1]; 255 char *optarg = NULL; 256 257 if (strchr (c, "ms")) 258 { 259 if ( argv[iArg][2] == ':' 260 || argv[iArg][2] == '=') 261 optarg = &argv[iArg][3]; 262 else if (iArg + 1 >= argc) 263 return usage (); 264 else 265 optarg = argv[++iArg]; 266 } 267 268 switch (c) 269 { 270 case 'm': 271 { 272 long_mul_threshold = strtol (optarg, &end, 10); 273 if (long_mul_threshold < 1 || *end != 0) 274 return usage (); 275 break; 276 } 277 278 case 'o': 279 out_fname = optarg; 280 break; 281 282 case 's': 283 single_prec = 1; 284 break; 285 286 default: 287 return usage (); 288 } 289 } 270 290 271 291 compute_all_powers ();
Note:
See TracChangeset
for help on using the changeset viewer.