Skip to content

Commit 5805950

Browse files
committed
build: fpu becomes an optional part
1 parent 2ae2bbd commit 5805950

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ SLIRP_INC =
99
SLIRP_LIB = -lslirp
1010

1111
CFLAGS = -I . -Wall -O3 -ffunction-sections -fdata-sections -g -Wl,--gc-sections ${SLIRP_INC}
12+
CFLAGS += -DI386_ENABLE_FPU
1213
CFLAGS += -DI386_ENABLE_MMX -DI386_ENABLE_SSE -DI386_ENABLE_SSE2 -DI386_ENABLE_SSE3
1314
CFLAGS_SDL = ${CFLAGS} `${SDL_CONFIG} --cflags`
1415

esp/main/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ else()
3030
add_definitions(-include ${CMAKE_CURRENT_SOURCE_DIR}/board_jc3248w535.h)
3131
endif()
3232

33+
add_definitions(-DI386_ENABLE_FPU)
3334
add_definitions(-DUSE_FMOPL)
3435

3536
set_source_files_properties("../../adlib.c" PROPERTIES COMPILE_FLAGS "-Wno-all")

i386.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@
1717
#ifndef __wasm__
1818
#define I386_OPT2
1919
#endif
20-
#define I386_ENABLE_FPU
2120

2221
#ifdef I386_ENABLE_FPU
2322
#include "fpu.h"
2423
#else
2524
#define fpu_new(...) NULL
2625
#define fpu_exec1(...) false
2726
#define fpu_exec2(...) false
27+
#define fpu_delete(...)
2828
typedef void FPU;
2929
#endif
3030

wasm/Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ main.c \
1919
../pc.c \
2020
libc/libc.c
2121

22-
CFLAGS = -DI386_ENABLE_MMX -DI386_ENABLE_SSE -DI386_ENABLE_SSE2 -DI386_ENABLE_SSE3
22+
CFLAGS =
23+
CFLAGS += -DI386_ENABLE_FPU
24+
CFLAGS += -DI386_ENABLE_MMX -DI386_ENABLE_SSE -DI386_ENABLE_SSE2 -DI386_ENABLE_SSE3
2325
CFLAGS += -DUSE_FMOPL
2426

2527
.PHONY: all

0 commit comments

Comments
 (0)