mirror of https://github.com/flysand7/ciabatta.git
Fix optimized builds emitting SSE code
This commit is contained in:
parent
845d08ee3a
commit
246e9f2071
17
build.py
17
build.py
|
@ -269,11 +269,26 @@ cia_lib = f'lib/{lib_file}'
|
|||
crt_lib = f'lib/{crt_file}'
|
||||
dl_lib = f'lib/{dl_file}'
|
||||
|
||||
dl_flags = [
|
||||
'-shared',
|
||||
'-nostdlib',
|
||||
'-mno-sse',
|
||||
'-ffreestanding',
|
||||
'-fno-stack-protector',
|
||||
'-Wl,-e,_dlstart',
|
||||
'-Wl,--sort-section,alignment',
|
||||
'-Wl,--sort-common',
|
||||
'-Wl,--gc-sections',
|
||||
'-Wl,--hash-style=both',
|
||||
'-Wl,--no-undefined',
|
||||
'-Wl,--exclude-libs=ALL',
|
||||
]
|
||||
|
||||
if target == 'linux':
|
||||
print_step(f'Compiling {dl_lib}\n')
|
||||
assemble('src/loader/loader-entry.asm', 'bin/loader-entry.o')
|
||||
compile(['bin/loader-entry.o', 'src/loader/loader-self-reloc.c', 'src/loader/loader.c'], dl_lib,
|
||||
'-ffreestanding -shared -nostdlib -Wl,-e,_dlstart -Wl,--sort-section,alignment -Wl,--sort-common -Wl,--gc-sections -Wl,--hash-style=both -Wl,--no-undefined -Wl,--exclude-libs=ALL -fno-stack-protector')
|
||||
' '.join(dl_flags))
|
||||
|
||||
print_step(f'Compiling {crt_file}\n')
|
||||
if target == 'linux':
|
||||
|
|
|
@ -116,7 +116,7 @@ static void printf(char *fmt, ...) {
|
|||
va_end(args);
|
||||
}
|
||||
|
||||
#if defined(_DEBUG)
|
||||
#if defined(_DEBUG) || 1
|
||||
#define _dbg_print_char(c) print_char(c)
|
||||
#define _dbg_print_string(s) print_string(s)
|
||||
#define _dbg_print_string_n(s,n) print_string_n(s,n)
|
||||
|
|
Loading…
Reference in New Issue