[Git][ghc/ghc][wip/js-staging] configure JS: remove wrapper scripts

doyougnu (@doyougnu) gitlab at gitlab.haskell.org
Tue Aug 16 17:13:01 UTC 2022



doyougnu pushed to branch wip/js-staging at Glasgow Haskell Compiler / GHC


Commits:
0430b9a2 by doyougnu at 2022-08-16T13:11:30-04:00
configure JS: remove wrapper scripts

- - - - -


1 changed file:

- configure.ac


Changes:

=====================================
configure.ac
=====================================
@@ -375,46 +375,17 @@ then
         echo "No emsdk bin set: defaulting to $EMSDK/upstream/emscripten"
     fi
 
-    test -d inplace || mkdir inplace
-
-    ghcjsbin="$hardtop/inplace/ghcjs_toolchain/bin/"
-    mkdir -p $ghcjsbin
-
-    echo "#!/usr/bin/env bash"                         > "$ghcjsbin/js-unknown-ghcjs-cc"
-    echo "exec \"$EMSDK_BIN/emcc\" \"\$@\"" >> "$ghcjsbin/js-unknown-ghcjs-cc"
-    chmod 755 "$ghcjsbin/js-unknown-ghcjs-cc"
-
-    echo "#!/usr/bin/env bash"                         > "$ghcjsbin/js-unknown-ghcjs-ar"
-    echo "exec \"$EMSDK_LLVM/bin/llvm-ar\" \"\$@\""    >> "$ghcjsbin/js-unknown-ghcjs-ar"
-    chmod 755 "$ghcjsbin/js-unknown-ghcjs-ar"
-
-    echo "#!/usr/bin/env bash"                           > "$ghcjsbin/js-unknown-ghcjs-ranlib"
-    echo "exec \"$EMSDK_LLVM/bin/llvm-ranlib\" \"\$@\""  >> "$ghcjsbin/js-unknown-ghcjs-ranlib"
-    chmod 755 "$ghcjsbin/js-unknown-ghcjs-ranlib"
-
-    echo "#!/usr/bin/env bash"                           > "$ghcjsbin/js-unknown-ghcjs-nm"
-    echo "exec \"$EMSDK_LLVM/bin/llvm-nm\" \"\$@\""      >> "$ghcjsbin/js-unknown-ghcjs-nm"
-    chmod 755 "$ghcjsbin/js-unknown-ghcjs-nm"
-
-    dnl the linker shouldn't be used because GHC does the JS linking.
-    dnl it makes no harm to pass emscripten's one here though and it avoids
-    dnl dealing with the rest of the build system that assumes that a linker is
-    dnl available.
-    echo "#!/usr/bin/env bash"                       > "$ghcjsbin/js-unknown-ghcjs-ld"
-    echo "exec \"$EMSDK_LLVM/bin/llvm-link\" \"\$@\""  >> "$ghcjsbin/js-unknown-ghcjs-ld"
-    chmod 755 "$ghcjsbin/js-unknown-ghcjs-ld"
-
-    export PATH=$ghcjsbin:$PATH
-
     dnl We need to use AC_CHECK_TARGET_TOOL instead of AC_PATH_PROG below that
     dnl doesn't take into account the target triple...
     dnl Why are we inflicting all this to ourselves?
-    AC_PATH_TARGET_TOOL([CC],[gcc])
-    AC_PATH_TARGET_TOOL([CXX],[g++])
-    AC_PATH_TARGET_TOOL([NM],[nm])
-    AC_PATH_TARGET_TOOL([AR],[ar])
-    AC_PATH_TARGET_TOOL([RANLIB],[ranlib])
-    AC_PATH_TARGET_TOOL([OBJDUMP],[objdump])
+    AC_PATH_TOOL([CC],[emcc],[gcc],[$EMSDK$PATH_SEPERATOR$PATH])
+    AC_PATH_TOOL([CXX],[g++])
+    AC_PATH_TOOL([NM],[llvm-nm],[nm],[$EMSDK_BIN$PATH_SEPERATOR$PATH])
+    AC_PATH_TOOL([AR],[llvm-ar],[ar],[$EMSDK_BIN$PATH_SEPERATOR$PATH])
+    AC_PATH_TOOL([RANLIB],[llvm-ranlib],[ranlib],[$EMSDK_BINF$PATH_SEPERATOR$PATH])
+    AC_PATH_TOOL([OBJDUMP],[llvm-objdump],[objdump],[$EMSDK_BIN$PATH_SEPERATOR$PATH])
+
+
 
 else
 



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0430b9a23329269b8e477b514a8cea286e34ea77

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0430b9a23329269b8e477b514a8cea286e34ea77
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/20220816/10b0bec1/attachment-0001.html>


More information about the ghc-commits mailing list