diff options
author | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2022-09-06 17:18:29 +0200 |
---|---|---|
committer | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2023-02-17 17:59:50 +0100 |
commit | 709dff7fe335ae3510ae77365fe1197bb67a4d36 (patch) | |
tree | d53d53e03b8e06488405de7cc1b77eefaa9db121 /samsung-ipc/tests | |
parent | 2a83232e195af5434bfd8aaa7ec163b806405305 (diff) | |
download | hardware_replicant_libsamsung-ipc-709dff7fe335ae3510ae77365fe1197bb67a4d36.tar.gz hardware_replicant_libsamsung-ipc-709dff7fe335ae3510ae77365fe1197bb67a4d36.tar.bz2 hardware_replicant_libsamsung-ipc-709dff7fe335ae3510ae77365fe1197bb67a4d36.zip |
Enable static builds of (test) utilities
Note that we cannot cross compile static binaries out of the box yet
with Guix. For instance if we use:
guix build --target=arm-linux-gnueabihf --file=scripts/guix.scm
We end up with the following error:
Backtrace:
In guix/ui.scm:
462:3 19 (_)
In ice-9/boot-9.scm:
1747:15 18 (with-exception-handler
#<procedure 9d77630 at ice-9/b…> …)
1752:10 17 (with-exception-handler _ _ #:unwind? _ # _)
In guix/ui.scm:
449:6 16 (_)
In guix/scripts/build.scm:
715:5 15 (_)
In srfi/srfi-1.scm:
673:15 14 (append-map _ _ . _)
586:17 13 (map1 ("i686-linux"))
In guix/scripts/build.scm:
717:21 12 (_ _)
In guix/store.scm:
1377:11 11 (map/accumulate-builds
#<store-connection 256.99 82587…> …)
1295:8 10 (call-with-build-handler
#<procedure 9d77600 at guix/s…> …)
In guix/scripts/build.scm:
676:18 9 (_ _)
In guix/store.scm:
2165:25 8 (run-with-store
#<store-connection 256.99 8258758> #<p…> …)
1993:13 7 (_ #<store-connection 256.99 8258758>)
In guix/packages.scm:
1899:40 6 (_)
1517:16 5 (package->bag _ _ _ #:graft? _)
1614:22 4 (thunk)
1353:35 3 (lower* . _)
In ice-9/boot-9.scm:
1685:16 2 (raise-exception _ #:continuable? _)
1685:16 1 (raise-exception _ #:continuable? _)
1685:16 0 (raise-exception _ #:continuable? _)
ice-9/boot-9.scm:1685:16: In procedure raise-exception:
In procedure struct-vtable: Wrong type argument in position 1
(expecting struct): #f
But if we remove the transformed packages from guix.scm, for instance by
removing them from the list of packages to build at the end of the file:
(list libsamsung-ipc
libsamsung-ipc-static
- (with-fixed-android-make-stub libsamsung-ipc-clang-android)
- (with-fixed-android-make-stub libsamsung-ipc-gcc-android)
libsamsung-ipc-clang-autotools
libsamsung-ipc-gcc-autotools)
cross compilation then works.
Thanks to the help from people on #autotools on liberachat for
suggestions on how to improve this patch.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Diffstat (limited to 'samsung-ipc/tests')
-rw-r--r-- | samsung-ipc/tests/Makefile.am | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/samsung-ipc/tests/Makefile.am b/samsung-ipc/tests/Makefile.am index 494be9a..ad4280e 100644 --- a/samsung-ipc/tests/Makefile.am +++ b/samsung-ipc/tests/Makefile.am @@ -7,6 +7,8 @@ AM_CFLAGS = \ $(OPENSSL_CFLAGS) \ $(NULL) +AM_LDFLAGS = $(ALL_STATIC_LDFLAGS) + if WANT_STRICT_CFLAGS AM_CFLAGS += $(STRICT_CFLAGS) endif @@ -24,7 +26,6 @@ libsamsung_ipc_test_SOURCES = \ $(NULL) libsamsung_ipc_test_LDADD = $(top_builddir)/samsung-ipc/libsamsung-ipc.la -libsamsung_ipc_test_LDFLAGS = # TODO: Find a way to make test more modular and represent each run of # libsamsung-ipc-test in TEST while having it implemented in a single |