Skip to content

Commit a1fdd7c

Browse files
authored
Merge branch 'master' into master
2 parents fcded85 + f10ba45 commit a1fdd7c

File tree

8 files changed

+16
-159
lines changed

8 files changed

+16
-159
lines changed

.travis.yml

-106
This file was deleted.

CMakeLists.txt

+8-10
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
cmake_minimum_required(VERSION 3.25)
22

33
project(openlibm
4-
VERSION 0.8.0
4+
VERSION 0.8.2
55
LANGUAGES C ASM)
66

7-
add_library("${PROJECT_NAME}")
7+
option(BUILD_SHARED_LIBS "Build using shared libraries" ON)
88

9+
add_library("${PROJECT_NAME}")
910

1011
# Find the relevant folder depending on the architecture
1112
set(OPENLIBM_ARCH_FOLDER ${CMAKE_SYSTEM_PROCESSOR})
1213
string(TOLOWER "${OPENLIBM_ARCH_FOLDER}" OPENLIBM_ARCH_FOLDER)
1314

1415
if(${OPENLIBM_ARCH_FOLDER} STREQUAL "amd64" OR ${OPENLIBM_ARCH_FOLDER} STREQUAL "x86_64")
1516
set(OPENLIBM_ARCH_FOLDER "amd64")
16-
elseif(${OPENLIBM_ARCH_FOLDER} MATCHES "arm64")
17+
elseif(${OPENLIBM_ARCH_FOLDER} STREQUAL "arm64" OR ${OPENLIBM_ARCH_FOLDER} STREQUAL "aarch64")
1718
set(OPENLIBM_ARCH_FOLDER "aarch64")
1819
elseif(${OPENLIBM_ARCH_FOLDER} STREQUAL "x86")
1920
set(OPENLIBM_ARCH_FOLDER "i387")
@@ -53,13 +54,6 @@ if(OPENLIBM_SUPPRESS_WARNINGS)
5354
list(APPEND C_ASM_COMPILE_FLAGS "-w")
5455
endif()
5556

56-
list(APPEND C_ASM_COMPILE_FLAGS
57-
"-I${PROJECT_SRC}"
58-
"-I${PROJECT_SRC}/include"
59-
"-I${PROJECT_SRC}/${OPENLIBM_ARCH_FOLDER}"
60-
"-I${PROJECT_SRC}/src"
61-
)
62-
6357
# Add compile flags
6458
target_compile_options("${PROJECT_NAME}" PUBLIC ${C_ASM_COMPILE_FLAGS})
6559

@@ -552,3 +546,7 @@ else()
552546
endif()
553547

554548
target_include_directories("${PROJECT_NAME}" PUBLIC ${OPENLIBM_INCLUDE_DIRS})
549+
550+
file(GLOB PUBLIC_HEADERS "*.h" "include/*.h" "${OPENLIBM_ARCH_FOLDER}/*.h" "src/*.h")
551+
set_target_properties("${PROJECT_NAME}" PROPERTIES PUBLIC_HEADER "${PUBLIC_HEADERS}")
552+
install (TARGETS "${PROJECT_NAME}")

Make.inc

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ endif
3939

4040
ifeq ($(ARCH),wasm32)
4141
USECLANG = 1
42+
USEGCC = 0
4243
TOOLPREFIX = llvm-
4344
endif
4445

README.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ loongarch64.
2929
Linux and Windows.
3030
3. Use `make USECLANG=1` to build with clang. This is the default on OS X, FreeBSD,
3131
and OpenBSD.
32-
4. Use `make ARCH=wasm32` to build the wasm32 library with clang. Requires clang-8.
32+
4. Use `make ARCH=wasm32` to build the wasm32 library with clang.
3333
5. Architectures are auto-detected. Use `make ARCH=i386` to force a
3434
build for i386. Other supported architectures are i486, i586, and
3535
i686. GCC 4.8 is the minimum requirement for correct codegen on
@@ -61,8 +61,9 @@ qemu-$ARCH-static -L . -L /usr/$TRIPLE/ test/test-double
6161
or generate project with build system of choice e.g. `cmake /path/to/openlib/ -G "MinGW Makefiles"`.
6262
3. Build with the build system with `cmake --build .`.
6363

64-
Default CMake configuration builds a shared library, this can easily be changed by replacing
65-
the keyword in the `add_library()` command in the `CMakeLists.txt`.
64+
Default CMake configuration builds a shared library, this can easily be configured using
65+
[BUILD_SHARED_LIBS](https://cmake.org/cmake/help/latest/variable/BUILD_SHARED_LIBS.html)
66+
configuration option.
6667

6768

6869
## Acknowledgements

appveyor.yml

-37
This file was deleted.

include/openlibm_fenv.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include <openlibm_fenv_amd64.h>
99
#elif defined(__i386__)
1010
#include <openlibm_fenv_i387.h>
11-
#elif defined(__powerpc__) || defined(__ppc__)
11+
#elif defined(__powerpc__) || defined(__POWERPC__)
1212
#include <openlibm_fenv_powerpc.h>
1313
#elif defined(__mips__)
1414
#include <openlibm_fenv_mips.h>

include/openlibm_fenv_powerpc.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ extern const fenv_t __fe_dfl_env;
9797
union __fpscr {
9898
double __d;
9999
struct {
100-
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
100+
#if defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
101101
fenv_t __reg;
102102
__uint32_t __junk;
103103
#else

src/fpmath.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
#else
3838
#include "i386_fpmath.h"
3939
#endif
40-
#elif defined(__powerpc__) || defined(__ppc__)
40+
#elif defined(__powerpc__) || defined(__POWERPC__)
4141
#include "powerpc_fpmath.h"
4242
#elif defined(__mips__)
4343
#include "mips_fpmath.h"

0 commit comments

Comments
 (0)