]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
Attempt to get asm rodata working on macosx.
authorNiels Möller <nisse@lysator.liu.se>
Tue, 17 Dec 2013 21:10:10 +0000 (22:10 +0100)
committerNiels Möller <nisse@lysator.liu.se>
Tue, 17 Dec 2013 21:10:10 +0000 (22:10 +0100)
ChangeLog
config.m4.in
configure.ac
x86_64/gcm-hash8.asm

index 7b4f9b1566b9fe3b04236573c2a16f7a66569b39..c02241e1f28c3d7bf261f9e492449d2b72266a7d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2013-12-17  Niels Möller  <nisse@lysator.liu.se>
 
+       * configure.ac (ASM_RODATA): New substituted variable. Needed for
+       portability to darwin.
+       * config.m4.in: Define RODATA, using configure variable ASM_RODATA
+       * x86_64/gcm-hash8.asm: Use RODATA macro.
+
        * bignum-random-prime.c (_nettle_generate_pocklington_prime): Use
        stronger variants of Pocklington's theorem, to allow p0 of size
        down to bits/3.
index 4c6565f5c2bb196d7bc3569e6b7903a0c5fe2e98..da57e2533ee54d63aa73789ce441caff1ff58f93 100644 (file)
@@ -6,6 +6,7 @@ define(<TYPE_PROGBITS>, <@ASM_TYPE_PROGBITS@>)dnl
 define(<ALIGN_LOG>, <@ASM_ALIGN_LOG@>)dnl
 define(<ALIGNOF_UINT64_T>, <@ALIGNOF_UINT64_T@>)dnl
 define(<W64_ABI>, <@W64_ABI@>)dnl
+define(<RODATA>, <@ASM_RODATA@>)dnl
 divert(1)
 @ASM_MARK_NOEXEC_STACK@
 divert
index a4deaae5ed7a9a9b8ce9245d284ee7a55052f7b0..acfc59cd9a2850f7d44859c024be5a7b1252df14 100644 (file)
@@ -332,10 +332,19 @@ EOF
       AC_MSG_WARN([No assembler files found.])
     fi
   fi
+  case "$host_os" in
+    darwin*)
+      ASM_RODATA='.section __TEXT,__const'
+      ;;
+    *)
+      ASM_RODATA='.section .rodata'
+      ;;
+  esac
 fi
 
 AC_SUBST([OPT_ASM_NETTLE_SOURCES])
 AC_SUBST([OPT_ASM_HOGWEED_SOURCES])
+AC_SUBST([ASM_RODATA])
 
 AH_VERBATIM([HAVE_NATIVE],
 [/* Define to 1 each of the following for which a native (ie. CPU specific)
index 60f444d05eb2b243a6fe3b1fba3108130169a6ea..e742cec66a67e4840fdc19ba61eb9bc3db37f2ee 100644 (file)
@@ -188,7 +188,7 @@ ALIGN(16)
 EPILOGUE(_nettle_gcm_hash8)
 
 define(<W>, <0x$2$1>)
-       .section .rodata
+       RODATA
        ALIGN(2)
 .Lshift_table:
 .short W(00,00),W(01,c2),W(03,84),W(02,46),W(07,08),W(06,ca),W(04,8c),W(05,4e)