Changeset 15854f1 in buchla-68k
- Timestamp:
- 08/06/2017 08:44:54 PM (7 years ago)
- Branches:
- master
- Children:
- 84c0125
- Parents:
- cc2c9e0
- Files:
-
- 1 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified Makefile ¶
rcc2c9e0 r15854f1 14 14 # hand-written assembly language code 15 15 16 FLAGS_COM := $(FLAGS) -mshort -std=c99 -f leading-underscore -ffreestanding\17 - nostdinc -fno-strict-aliasing -fno-inline -fno-omit-frame-pointer \16 FLAGS_COM := $(FLAGS) -mshort -std=c99 -ffreestanding -nostdinc \ 17 -fno-strict-aliasing -fno-inline -fno-omit-frame-pointer \ 18 18 -Wpedantic -Wconversion -Wsign-conversion -Wshadow \ 19 19 -Wstrict-prototypes -Wmissing-declarations -Wredundant-decls \ … … 41 41 build/%.o: prolog/%.c $(HEADERS) | build 42 42 $(CROSS_GCC) $(FLAGS_COM) -c -o $@ $< 43 $(CROSS_OBJC) --redefine-syms misc/rewrite.txt $@44 43 45 44 build/%.o: prolog/%.s $(HEADERS) | build … … 65 64 build/%.o: libcio/%.c $(HEADERS) | build 66 65 $(CROSS_GCC) $(FLAGS_COM) -c -o $@ $< 67 $(CROSS_OBJC) --redefine-syms misc/rewrite.txt $@68 66 69 67 build/%.o: libcio/%.s $(HEADERS) | build … … 88 86 build/%.o: vlib/%.c $(HEADERS) | build 89 87 $(CROSS_GCC) $(FLAGS_COM) -c -o $@ $< 90 $(CROSS_OBJC) --redefine-syms misc/rewrite.txt $@91 88 92 89 build/%.o: vlib/%.s $(HEADERS) | build … … 106 103 build/%.o: iolib/%.c $(HEADERS) | build 107 104 $(CROSS_GCC) $(FLAGS_COM) -c -o $@ $< 108 $(CROSS_OBJC) --redefine-syms misc/rewrite.txt $@109 105 110 106 build/%.o: iolib/%.s $(HEADERS) | build … … 126 122 build/%.o: libsm/%.c $(HEADERS) | build 127 123 $(CROSS_GCC) $(FLAGS_COM) -c -o $@ $< 128 $(CROSS_OBJC) --redefine-syms misc/rewrite.txt $@129 124 130 125 libsm.a: $(LIBSM_OBJ) … … 143 138 build/%.o: lib700/%.c $(HEADERS) | build 144 139 $(CROSS_GCC) $(FLAGS_COM) -c -o $@ $< 145 $(CROSS_OBJC) --redefine-syms misc/rewrite.txt $@146 140 147 141 build/%.o: lib700/%.s $(HEADERS) | build … … 167 161 build/%.o: rom/%.c $(HEADERS) | build 168 162 $(CROSS_GCC) $(FLAGS_COM) -c -o $@ $< 169 $(CROSS_OBJC) --redefine-syms misc/rewrite.txt $@170 163 171 164 build/%.o: rom/%.s $(HEADERS) | build … … 217 210 build/%.o: ram/%.c $(HEADERS) | build 218 211 $(CROSS_GCC) $(FLAGS_COM) -c -o $@ $< 219 $(CROSS_OBJC) --redefine-syms misc/rewrite.txt $@220 212 221 213 build/%.o: ram/%.s $(HEADERS) | build -
TabularUnified readme.txt ¶
rcc2c9e0 r15854f1 232 232 functions to preserve A2 and D2, so that GCC code generation can 233 233 use all registers. 234 235 * The hand-written assembly language code expects C function names236 to be prefixed with an underscore. That's why we pass the237 -fleading-underscore option to GCC. However, this breaks linking238 with libgcc, which doesn't use leading underscores.239 240 Currently, we work around this issue by stripping the leading241 underscore from references to libgcc functions using objcopy. See242 misc/rewrite.txt for the function name mapping.243 244 Ultimately, we should fix any references to C functions in the245 hand-written assembly language code.
Note:
See TracChangeset
for help on using the changeset viewer.