[Git][ghc/ghc][wip/rts-configure-2] 2 commits: Slight cleanup of syntax

John Ericson (@Ericson2314) gitlab at gitlab.haskell.org
Fri Dec 9 03:40:02 UTC 2022



John Ericson pushed to branch wip/rts-configure-2 at Glasgow Haskell Compiler / GHC


Commits:
f476c792 by John Ericson at 2022-12-08T21:49:52-05:00
Slight cleanup of syntax

- - - - -
cff1dc32 by John Ericson at 2022-12-08T22:39:27-05:00
Need to use CPP not `if` in rts.buildinfo

- - - - -


2 changed files:

- rts/configure.ac
- rts/rts.buildinfo.in


Changes:

=====================================
rts/configure.ac
=====================================
@@ -138,7 +138,7 @@ dnl    as we need to know whether we need libm
 dnl    for math functions or not
 dnl    (see https://gitlab.haskell.org/ghc/ghc/issues/3730)
 AC_CHECK_LIB([m], [atan], [need_libm=1], [need_libm=0])
-AC_DEFINE_UNQUOTED([GHC_NEED_LIBM], [$need_libm], [Define to 1 if you need to link with libm])],
+AC_DEFINE_UNQUOTED([GHC_NEED_LIBM], [$need_libm], [Define to 1 if you need to link with libm])
 
 dnl ** check for librt
 AC_CHECK_LIB([rt], [clock_gettime], [need_librt=1], [need_librt=1])
@@ -189,6 +189,7 @@ dnl Generate build-info
 dnl ######################################################################
 
 cat $srcdir/rts.buildinfo.in | \
+    sed -e 's/^  *//' | \
     "$CC" -E -P -traditional - -o - \
     > rts.buildinfo
 rm -f external-symbols.list


=====================================
rts/rts.buildinfo.in
=====================================
@@ -3,59 +3,61 @@ ld-options:
 #include "external-symbols.list"
 
 #if GHC_LIBFFI_ADJUSTORS
--- Adjustors via libffi
-c-sources: adjustor/LibffiAdjustor.c
+  -- Adjustors via libffi
+  c-sources: adjustor/LibffiAdjustor.c
 #else
--- Use GHC's native adjustors
-if arch(i386)
-  asm-sources: adjustor/Nativei386Asm.S
-  c-sources: adjustor/Nativei386.c
-if arch(x86_64)
-  if os(mingw32)
-    asm-sources: adjustor/NativeAmd64MingwAsm.S
-    c-sources: adjustor/NativeAmd64Mingw.c
-  else
-    asm-sources: adjustor/NativeAmd64Asm.S
-    c-sources: adjustor/NativeAmd64.c
-if arch(ppc) || arch(ppc64)
-  asm-sources: AdjustorAsm.S
-  c-sources: adjustor/NativePowerPC.c
-if arch(ia64)
-  c-sources: adjustor/NativeIA64.c
+  -- Use GHC's native adjustors
+# if defined(i386_HOST_ARCH)
+    asm-sources: adjustor/Nativei386Asm.S
+    c-sources: adjustor/Nativei386.c
+# elif defined(x86_64_HOST_ARCH)
+#   if defined(mingw32_HOST_OS)
+      asm-sources: adjustor/NativeAmd64MingwAsm.S
+      c-sources: adjustor/NativeAmd64Mingw.c
+#   else
+      asm-sources: adjustor/NativeAmd64Asm.S
+      c-sources: adjustor/NativeAmd64.c
+#   endif
+# elif defined(powerpc_HOST_ARCH) || defined(powerpc64_HOST_ARCH)
+    asm-sources: AdjustorAsm.S
+    c-sources: adjustor/NativePowerPC.c
+# elif defined(ia64_HOST_ARCH)
+    c-sources: adjustor/NativeIA64.c
+# endif
 #endif
 
 #if GHC_NEED_LIBRT
-extra-libraries: rt
+  extra-libraries: rt
 #endif
 
 #if GHC_NEED_LIBM
-extra-libraries: m
+  extra-libraries: m
 #endif
 
 #if GHC_NEED_LIBDL
-extra-libraries: dl
+  extra-libraries: dl
 #endif
 
 #if GHC_NEED_LIBATOMIC
--- for sub-word-sized atomic operations (#19119)
-extra-libraries: atomic
+  -- for sub-word-sized atomic operations (#19119)
+  extra-libraries: atomic
 #endif
 
 #if GHC_NEED_LIBPTHREAD
--- for pthread_getthreadid_np, pthread_create, ...
-extra-libraries: pthread
+  -- for pthread_getthreadid_np, pthread_create, ...
+  extra-libraries: pthread
 #endif
 
 #if USE_LIBBFD
--- for debugging
-extra-libraries: bfd iberty
+  -- for debugging
+  extra-libraries: bfd iberty
 #endif
 
 #if USE_LIBDW
--- for backtraces
-extra-libraries: elf dw
+  -- for backtraces
+  extra-libraries: elf dw
 #endif
 
 #if USE_LIBNUMA
-extra-libraries: numa
+  extra-libraries: numa
 #endif



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/53a33fafc195ceb46647f4225c4fe6f950fa2fdc...cff1dc328e03d777d391f94003db7e7f5104f8f8

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/53a33fafc195ceb46647f4225c4fe6f950fa2fdc...cff1dc328e03d777d391f94003db7e7f5104f8f8
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20221208/a59e71f4/attachment-0001.html>


More information about the ghc-commits mailing list