576 Commits

Author SHA1 Message Date
4413af583b alnyan/yggdrasil: fix riscv64 build 2025-02-26 18:14:08 +02:00
42f9cd9675 alnyan/yggdrasil: fix build for aarch64 2024-11-18 19:28:31 +02:00
8840f9fe48 alnyan/yggdrasil: force cross-compilation for clang 2024-11-13 16:17:30 +02:00
Li Bohai
c4667caea2
Fix fenv_t initializer (#308) 2024-11-09 08:40:26 -05:00
Andrey Turkin
5992e5a177
Fix risc-v build (#305)
Two fixes in one:

Firstly, replace non-standard __uint64_t with standard (but optional) uint64_t.
__uint64_t is not a part of C standard; it is defined by some platforms but might not
be present in every environment (e.g. in freestanding build). On the other hand, uint64_t
is standard C. It is optional but virtual guaranteed to be present for any 32/64 bit machine.

Secondly, mark riscv64 for 128-bit long double in make/cmake files. This fixes cmake
build (which detects presence of long double and tries to compile extended functions),
and brings make build to do the same.

Co-authored-by: Viral B. Shah <ViralBShah@users.noreply.github.com>
2024-08-08 17:19:43 -04:00
Jakov Smolić
e2482c959e
Add stack markings for GNU to fmod assembly files (#307)
This adds stack markings to the missing fmod .S files, otherwise the
final libopenlibm object file gets marked with an executable stack.

Output when compiling from source on Gentoo Linux:

```
 * QA Notice: The following files contain writable and executable sections
 *  Files with such sections will not work properly (or at all!) on some
 *  architectures/operating systems.  A bug should be filed at
 *  https://bugs.gentoo.org/ to make sure the issue is fixed.
 *  For more information, see:
 *
 *    https://wiki.gentoo.org/wiki/Hardened/GNU_stack_quickstart
 *
 *  Please include the following list of files in your report:
 *  Note: Bugs should be filed for the respective maintainers
 *  of the package in question and not hardened@gentoo.org.
 * RWX --- --- usr/lib64/libopenlibm.so.4.0
```
2024-08-04 18:12:41 -04:00
Vilius Sutkus '89
d66f477283
Merge pull request #299 from theos-sh/master
CMake Changes
2024-06-25 16:40:52 +03:00
Vilius Sutkus '89
f644978097
Merge pull request #304 from ViliusSutkus89/long_double_not_double
CMake changes: Long double/double size detection, Android x86 and armv7 support, install pkg-config pc file
2024-06-25 16:36:07 +03:00
Vilius Sutkus '89
c1e8462f8d Regex match Make.inc to match CMake version with Autotools version 2024-06-22 13:54:54 +03:00
Vilius Sutkus '89
3335ebc9d8 Generate pkg-config.pc file in CMake 2024-06-21 13:25:46 +03:00
Vilius Sutkus '89
7df0e2f024 Compile time check if LONG DOUBLE is different from DOUBLE
Hardcoded config value provided wrong value for Android i686.
2024-06-21 13:25:30 +03:00
Vilius Sutkus '89
a245816e2a Add support for Android x86 (i686) 2024-06-21 12:19:37 +03:00
Vilius Sutkus '89
f051cd47c8 Add support for armv7-a 2024-06-21 12:18:55 +03:00
Vilius Sutkus '89
5fa83b1bd7 Use upcoming version number in CMakeLists 2024-06-21 12:16:36 +03:00
Theo Paris
a1fdd7c72b
Merge branch 'master' into master 2024-06-19 13:45:55 -07:00
Viral B. Shah
f10ba452b2
Delete appveyor.yml 2024-06-19 15:45:47 -04:00
Viral B. Shah
79d3a0764d
Delete .travis.yml 2024-06-19 15:45:25 -04:00
Vilius Sutkus '89
87e5f0b3f2
CMake updates (#302)
* Add BUILD_SHARED_LIBS option to choose between shared and static lib

* Fix build break for Android aarch64

* Install built target

* Set the correct version number

* Don't add include dirs through CFlags. Include dirs are already set as target property

* Install all relevant headers, not just from include dir

* Update note about BUILD_SHARED_LIBS in README.md

* Fix mistake in README.md, option(BUILD_SHARED_LIBS ON) sets the lib to shared by default
2024-06-19 15:02:50 -04:00
Sergey Fedorov
d9f2b0f21a
Minor fix-ups for Darwin PowerPC (#303)
* openlibm_fenv.h: fix PowerPC macro for Darwin

* openlibm_fenv_powerpc.h: check if __BYTE_ORDER__ is actually defined

* fpmath.h: fix PowerPC macro for Darwin
2024-06-19 15:01:51 -04:00
ryan-filmware
b3a6e991a4
build: use clang instead of llvm-gcc (#300)
Modern clang works just fine, also llvm-gcc is nowhere to be found.
2024-04-03 00:31:00 -04:00
Theo Paris
fcded8581a
build: allow riscv64 2024-03-15 16:02:45 -07:00
Theo Paris
46c36769ec
build: allow riscv64 2024-03-15 15:58:40 -07:00
Theo Paris
21d22c8ad0
build: apply cmake fixes 2024-03-15 15:55:19 -07:00
Oscar Smith
b42f035afb
Merge pull request #297 from JuliaMath/dependabot/github_actions/codecov/codecov-action-4
Bump codecov/codecov-action from 3 to 4
2024-02-01 16:38:58 -05:00
dependabot[bot]
3b6700bcfe
Bump codecov/codecov-action from 3 to 4
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3 to 4.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-01 21:14:40 +00:00
inky
4b83beb208
CI: Setup cross build test (#296)
* build: allow set TOOLPREFIX

* readme: add cross build steps

* ci: Setup cross build

* ci: use var in step name

* ci: split build / build test

* ci: add more arch

* ci: update ppc triple

* ci: update actions/checkout

* ci: todo: fix arm cross build

* ci: add more misp ci

* ci: remove mips64, mips64el

* ci: add more ppc ci

* ci: reopen arm CI
2024-02-01 12:26:31 -05:00
inky
fc3646625f
test: add target to gen coverage report (#295)
* test: add target to gen coverage report

* test: show branch coverage

* ci: setup codecov

* Readme: add codecov badge

* ci: upload coverage report

* test: add note for CODE_COVERAGE flag
2024-01-20 09:14:10 -06:00
dependabot[bot]
d3be5dfe07
Bump actions/checkout from 2 to 4 (#294)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-16 17:30:51 -05:00
Viral B. Shah
bc36005af8
Create dependabot.yml 2024-01-16 17:28:48 -05:00
Viral B. Shah
1e3511e407
Delete .github/FUNDING.yml 2024-01-16 17:27:58 -05:00
Viral B. Shah
ae59af701d
Update README.md 2024-01-16 17:26:56 -05:00
Ryonald Teofilo
f3eec73a3f
Correct long double check in CMakeLists.txt and remove duplicate definitions for static library builds too (#293)
* Fix mistake in CMakeLists.txt, only add sources in ld128 if long double isn't the same as double + aarch64

* Update README to mention that cmake build now defaults to shared library
2024-01-16 17:26:18 -05:00
Ryonald Teofilo
b31c64529c
Add support for building shared library with CMake (#291)
* Add support to build openlibm as a shared library using cmake by not compiling the C implementation when a native one exists

* Add CMake static and shared library build instruction and also added info about support for loongarch64

---------

Co-authored-by: Viral B. Shah <ViralBShah@users.noreply.github.com>
2024-01-11 10:36:14 +05:30
inky
bd591aaf08
Readme: add new arch: loongarch64 (#287) 2024-01-11 10:34:47 +05:30
A1phaN
eb5330efad
Support for loongarch64 architecture (#280)
* Support for loongarch64 architecture

* fix compile error
2024-01-10 09:53:48 +05:30
Siva Mahadevan
acf58d235e
build: fix pkgconfig cflags and libdir variables (#284) 2024-01-10 09:52:08 +05:30
Ryonald Teofilo
a010123801
Add CMake support (#286)
* Add CMakeLists file to build with CMake, tested with MinGW on Windows x64 and Apple Clang on MacOS arm64

* Use regex to ensure 'AppleClang' also passes under Clang
2024-01-10 09:50:58 +05:30
MarcusCalhoun-Lopez
12f5ffcc99
Fix Apple PowerPC build (#276)
Apple versions of GCC define __ppc__ instead of __powerpc__

Fixes #275
2023-06-24 23:26:52 -04:00
Keno Fischer
1d2c5e3bf5
Restore original fdlibm copyright on sincos files (#265)
These files are derived from the original fdlibm sin/cos files.
While we do already preserve that license notice in LICENSE.md
(so there's no actual license compliance issue here), it's
cleaner to have the copyright notice in the file as well, in
case somebody copies the file out of the repo.
2022-10-18 11:58:47 -07:00
Mark Kittisopikul
0edf8d6929
Remove non-working www subdomain from OpenLibm (#261) 2022-06-06 15:27:33 -07:00
Keno Fischer
ae2d916985
Correctly round double precision sqrt (#256)
As discussed in https://github.com/JuliaLang/julia/pull/43786, openlibm's sqrt function is incorrectly rounded for i387. IEEE requires correct rounding for these functions and LLVM relies on it. Fix that by setting the precision in the FPU control word (see e.g. e_ceil.S for similar FPU modifications).
2022-01-19 18:43:52 -05:00
Viral B. Shah
81d5e1603a
Add fmod assembly version (#255)
From https://github.com/freebsd/freebsd-src/tree/master/lib/msun/amd64
2021-11-14 22:12:34 -05:00
Viral B. Shah
465ca0a842
Update README.md 2021-11-09 21:32:18 -05:00
xctan
428e7af214
Support for riscv64 architecture (#254)
Changes needed for riscv64 support have been added.
Code for openlibm_fenv_riscv.h, riscv_fpmath.h and fenv.c
was taken from https://github.com/freebsd/freebsd
2021-11-09 21:31:45 -05:00
Viral B. Shah
ed7aea3e2b
Bump version to 0.8 (#248)
Bump the SOVERSION as well since we have some new exports and such.
2021-09-14 12:35:03 -04:00
jeremyd2019
69bb2804da
Another Windows ARM64 fix (#253)
* Another Windows ARM64 fix

include stdint.h to be sure that uint64_t can be used.
This header already had references to uint32_t, so I assumed it was safe to use those typedefs, but a compile error revealed it was not always.

* fix munged whitespace
2021-09-11 08:00:13 -04:00
jeremyd2019
3d4a902f31
Fixes for Windows ARM64 (#251)
* aarch64_fpmath.h: deal with LLP64 (Windows ARM64)

use uint64_t instead of unsigned long, as unsigned long is only 32 bits on Windows

* Make.inc: WINNT aarch64 long double is double

Add to list along with Darwin
2021-09-10 00:09:04 -04:00
jeremyd2019
a9568fbd22
[Windows] install import library to libdir (#249)
import libraries need to go in libdir (`/lib`), while dlls need to be on the PATH so need to be installed to shlibdir (`/bin`)
2021-09-10 00:06:52 -04:00
Dilum Aluthge
f88e52a89e
CI (Windows): set msys2 {0} as the default shell for all Windows steps (#247) 2021-09-09 19:21:05 -04:00
Dilum Aluthge
b48a2f7019
CI (Linux and macOS): Remove the arch variable, which currently has no effect (#246) 2021-09-09 19:18:40 -04:00