Browse Source

Merge branch 'master' of git://git.etherboot.org/scm/gpxe

tags/v0.9.3
Holger Lubitz 17 years ago
parent
commit
c125d15798
4 changed files with 42 additions and 23 deletions
  1. 10
    2
      src/Makefile.housekeeping
  2. 3
    21
      src/arch/i386/include/bits/stdint.h
  3. 5
    0
      src/include/compiler.h
  4. 24
    0
      src/include/stdint.h

+ 10
- 2
src/Makefile.housekeeping View File

39
 	@$(TOUCH) $@
39
 	@$(TOUCH) $@
40
 VERYCLEANUP	+= .toolcheck
40
 VERYCLEANUP	+= .toolcheck
41
 
41
 
42
+# Check for correct syntax for echo -e
43
+#
44
+ifeq ($(shell echo '\0101'),A)
45
+ECHO_E = echo
46
+else
47
+ECHO_E = echo -e
48
+endif
49
+
42
 # Build verbosity
50
 # Build verbosity
43
 #
51
 #
44
 ifeq ($(V),1)
52
 ifeq ($(V),1)
121
 	@$(CPP) $(CFLAGS) $(CFLAGS_$(3)) $(CFLAGS_$(4)) -DOBJECT=$(4) \
129
 	@$(CPP) $(CFLAGS) $(CFLAGS_$(3)) $(CFLAGS_$(4)) -DOBJECT=$(4) \
122
 		-Wno-error -M $(1) -MT "$(4)_DEPS" -MG -MP | \
130
 		-Wno-error -M $(1) -MT "$(4)_DEPS" -MG -MP | \
123
 		sed 's/_DEPS\s*:/_DEPS =/' >> $(2)
131
 		sed 's/_DEPS\s*:/_DEPS =/' >> $(2)
124
-	@echo -e '\n$$(BIN)/$(4).o : $(1) $$(MAKEDEPS) $$($(4)_DEPS)' \
132
+	@$(ECHO_E) '\n$$(BIN)/$(4).o : $(1) $$(MAKEDEPS) $$($(4)_DEPS)' \
125
 		 '\n\t$$(QM)echo "  [BUILD] $$@"\n' \
133
 		 '\n\t$$(QM)echo "  [BUILD] $$@"\n' \
126
 		 '\n\t$$(RULE_$(3))\n' \
134
 		 '\n\t$$(RULE_$(3))\n' \
127
 		 '\nBOBJS += $$(BIN)/$(4).o\n' \
135
 		 '\nBOBJS += $$(BIN)/$(4).o\n' \
368
 	@$(MKDIR) -p $(dir $(2))
376
 	@$(MKDIR) -p $(dir $(2))
369
 	@$(RM) $(2)
377
 	@$(RM) $(2)
370
 	@$(TOUCH) $(2)
378
 	@$(TOUCH) $(2)
371
-	@echo -e '$$(BIN)/%$(1) : $$(BIN)/%$(1).zbin' \
379
+	@$(ECHO_E) '$$(BIN)/%$(1) : $$(BIN)/%$(1).zbin' \
372
 		  '\n\t$$(QM)echo "  [FINISH] $$@"' \
380
 		  '\n\t$$(QM)echo "  [FINISH] $$@"' \
373
 		  '\n\t$$(Q)$$(CP) $$< $$@' \
381
 		  '\n\t$$(Q)$$(CP) $$< $$@' \
374
 		  '\n\t$$(Q)$$(FINALISE_$(1))' \
382
 		  '\n\t$$(Q)$$(FINALISE_$(1))' \

src/arch/i386/include/stdint.h → src/arch/i386/include/bits/stdint.h View File

1
-#ifndef STDINT_H
2
-#define STDINT_H
1
+#ifndef _BITS_STDINT_H
2
+#define _BITS_STDINT_H
3
 
3
 
4
 typedef typeof(sizeof(int))	size_t;
4
 typedef typeof(sizeof(int))	size_t;
5
 typedef signed long		ssize_t;
5
 typedef signed long		ssize_t;
18
 typedef unsigned long		physaddr_t;
18
 typedef unsigned long		physaddr_t;
19
 typedef unsigned long		intptr_t;
19
 typedef unsigned long		intptr_t;
20
 
20
 
21
-typedef int8_t s8;
22
-typedef uint8_t u8;
23
-typedef int16_t s16;
24
-typedef uint16_t u16;
25
-typedef int32_t s32;
26
-typedef uint32_t u32;
27
-typedef int64_t s64;
28
-typedef uint64_t u64;
29
-
30
-typedef int8_t int8;
31
-typedef uint8_t uint8;
32
-typedef int16_t int16;
33
-typedef uint16_t uint16;
34
-typedef int32_t int32;
35
-typedef uint32_t uint32;
36
-typedef int64_t int64;
37
-typedef uint64_t uint64;
38
-
39
-#endif /* STDINT_H */
21
+#endif /* _BITS_STDINT_H */

+ 5
- 0
src/include/compiler.h View File

311
  */
311
  */
312
 #define __shared __asm__ ( "_shared_bss" )
312
 #define __shared __asm__ ( "_shared_bss" )
313
 
313
 
314
+/**
315
+ * Optimisation barrier
316
+ */
317
+#define barrier() __asm__ __volatile__ ( "" : : : "memory" )
318
+
314
 #endif /* ASSEMBLY */
319
 #endif /* ASSEMBLY */
315
 
320
 
316
 #endif /* COMPILER_H */
321
 #endif /* COMPILER_H */

+ 24
- 0
src/include/stdint.h View File

1
+#ifndef _STDINT_H
2
+#define _STDINT_H
3
+
4
+#include <bits/stdint.h>
5
+
6
+typedef int8_t s8;
7
+typedef uint8_t u8;
8
+typedef int16_t s16;
9
+typedef uint16_t u16;
10
+typedef int32_t s32;
11
+typedef uint32_t u32;
12
+typedef int64_t s64;
13
+typedef uint64_t u64;
14
+
15
+typedef int8_t int8;
16
+typedef uint8_t uint8;
17
+typedef int16_t int16;
18
+typedef uint16_t uint16;
19
+typedef int32_t int32;
20
+typedef uint32_t uint32;
21
+typedef int64_t int64;
22
+typedef uint64_t uint64;
23
+
24
+#endif /* _STDINT_H */

Loading…
Cancel
Save