]> mj.ucw.cz Git - libucw.git/commitdiff
Configure: Recognize "armhf" architecture
authorMartin Mares <mj@ucw.cz>
Mon, 11 Feb 2019 11:32:13 +0000 (12:32 +0100)
committerMartin Mares <mj@ucw.cz>
Mon, 11 Feb 2019 11:32:13 +0000 (12:32 +0100)
I needed to build LibUCW on Raspberry PI.

However, support for armhf is still a little bit hackish:
You need to configure with "ARCH=armhf" (auto-detection from GCC machine
type does now work) and tests require an explicit export of LD_LIBRARY_PATH
run/lib.

ucw/perl/UCW/Configure/C.pm

index b14759258ff9c83eb9a45311be989eb6482c25a9..730b5145357a87da048b2196b6447e5944c7d113 100644 (file)
@@ -94,6 +94,13 @@ if ($arch eq 'i386') {
        Set("CPU_BIG_ENDIAN");
        UnSet("CPU_ALLOW_UNALIGNED");
        Set("CPU_STRUCT_ALIGN" => 4);
+} elsif ($arch eq "armhf") {
+       Set("CPU_ARM");
+       UnSet("CPU_64BIT_POINTERS");
+       Set("CPU_LITTLE_ENDIAN");
+       UnSet("CPU_BIG_ENDIAN");
+       UnSet("CPU_ALLOW_UNALIGNED");
+       Set("CPU_STRUCT_ALIGN" => 4);
 } elsif (!Get("CPU_LITTLE_ENDIAN") && !Get("CPU_BIG_ENDIAN")) {
        Fail "Architecture not recognized, please set CPU_xxx variables manually.";
 }