Skip to content

Commit 75d99e4

Browse files
committed
06bacb4: minor tweaks to compile with clang for e2k arch (linux)
1 parent 5af7a3d commit 75d99e4

6 files changed

Lines changed: 13 additions & 6 deletions

File tree

prog/1stPartyLibs/daScript/include/daScript/simulate/aot_builtin_math.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ namespace das {
7474
#else
7575
#define DAS_FINITE_MATH
7676
#endif
77-
#if defined(__clang__) && !defined(__arm64__) && !defined(_TARGET_C3)
77+
#if defined(__clang__) && !defined(__arm64__) && !defined(__e2k__) && !defined(_TARGET_C3)
7878
#pragma float_control(push)
7979
#pragma float_control(precise, on)
8080
#endif
@@ -107,7 +107,7 @@ namespace das {
107107
___noinline DAS_FINITE_MATH inline bool disfinite(double a) { return __builtin_isfinite(a); }
108108
#endif
109109
#undef DAS_FINITE_MATH
110-
#if defined(__clang__) && !defined(__arm64__) && !defined(_TARGET_C3)
110+
#if defined(__clang__) && !defined(__arm64__) && !defined(__e2k__) && !defined(_TARGET_C3)
111111
#pragma float_control(pop)
112112
#endif
113113
#else

prog/3rdPartyLibs/Detour/jamfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ if $(Platform) = linux || $(PlatformSpec) = clang {
3232
if $(PlatformArch) != arm64 { CPPopt += /clang:-fno-unsafe-math-optimizations ; }
3333
} else {
3434
CPPopt += -ffast-math ;
35-
if ! $(Platform) in iOS nswitch { CPPopt += -fno-unsafe-math-optimizations ; }
35+
if ! $(Platform) in iOS nswitch && ! $(PlatformArch) in e2k { CPPopt += -fno-unsafe-math-optimizations ; }
3636
}
3737
}
3838

prog/3rdPartyLibs/Recast/jamfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ if $(Platform) = linux || $(PlatformSpec) = clang {
3030
if $(PlatformArch) != arm64 { CPPopt += /clang:-fno-unsafe-math-optimizations ; }
3131
} else {
3232
CPPopt += -ffast-math ;
33-
if ! $(Platform) in iOS nswitch { CPPopt += -fno-unsafe-math-optimizations ; }
33+
if ! $(Platform) in iOS nswitch && ! $(PlatformArch) in e2k { CPPopt += -fno-unsafe-math-optimizations ; }
3434
}
3535
}
3636

prog/3rdPartyLibs/fmt/include/fmt/base.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,9 @@ inline auto map(int128_opt) -> monostate { return {}; }
419419
inline auto map(uint128_opt) -> monostate { return {}; }
420420
#endif
421421

422+
#if defined(__clang__) && defined(__e2k__) && (FMT_CLANG_VERSION < 1800) && !defined(FMT_USE_BITINT)
423+
# define FMT_USE_BITINT 0
424+
#endif
422425
#ifndef FMT_USE_BITINT
423426
# define FMT_USE_BITINT (FMT_CLANG_VERSION >= 1500)
424427
#endif

prog/engine/gameRes/jamfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ if $(PlatformSpec) in clang gcc && $(PlatformArch) in x86 x86_64 {
6767
}
6868
}
6969
}
70+
if $(PlatformSpec) in clang && $(PlatformArch) in e2k {
71+
opt on collisionGameRes.cpp += -Wno-pass-failed ;
72+
opt on collisionGameRes_avx.cpp += -Wno-pass-failed ;
73+
}
7074

7175
# Disable WPO to workaround `collisionGameRes.cpp(1350) : fatal error C1001: Internal compiler error.`
7276
if $(UseWholeOpt) = yes && $(Platform)-$(PlatformArch) = windows-arm64 && $(PlatformSpec) = vc17 { opt on collisionGameRes.cpp = /GL- ; }

prog/gameLibs/daNet/netUtils.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ bool readCompressedBlk(const danet::BitStream *message, DataBlock &blk)
8787
}
8888

8989
#if defined(_MSC_VER) || defined(__clang__)
90-
#if !(_TARGET_APPLE || _TARGET_C3) || (_TARGET_PC_MACOSX && !_TARGET_SIMD_NEON)
90+
#if !(_TARGET_APPLE || _TARGET_C3 || defined(__e2k__)) || (_TARGET_PC_MACOSX && !_TARGET_SIMD_NEON)
9191
#pragma float_control(push)
9292
#pragma float_control(precise, on)
9393
#endif
@@ -295,7 +295,7 @@ void unpack_velocity(unsigned int packed, Point3 &vel, float maxSpeed)
295295
}
296296

297297
#if defined(_MSC_VER) || defined(__clang__)
298-
#if !(_TARGET_APPLE || _TARGET_C3) || (_TARGET_PC_MACOSX && !_TARGET_SIMD_NEON)
298+
#if !(_TARGET_APPLE || _TARGET_C3 || defined(__e2k__)) || (_TARGET_PC_MACOSX && !_TARGET_SIMD_NEON)
299299
#pragma float_control(pop)
300300
#endif
301301
#endif

0 commit comments

Comments
 (0)