Last-Modified: Sun, 12 Jan 2025 03:23:50 GMT
Expires: Sun, 12 Jan 2025 03:38:50 GMT

<!DOCTYPE html>
<html lang='en'>
<head>
<title>guix - Wojtek's customized Guix</title>
<meta name='generator' content='cgit v1.2.3'/>
<meta name='robots' content='noindex, nofollow'/>
<link rel='stylesheet' type='text/css' href='/cgit-static/cgit.css'/>
<link rel='stylesheet' type='text/css' href='/cgit-static/better-cgit-markdown-heading-color.css'/>
<link rel='shortcut icon' href='/cgit-static/favicon.ico'/>
<link rel='alternate' title='Atom feed' href='https://git.koszko.org/guix/atom/?h=koszko' type='application/atom+xml'/>
</head>
<body>
<div id='cgit'><table id='header'>
<tr>
<td class='logo' rowspan='2'><a href='/'><img src='https://git.koszko.org/cgit-static/cgit.png' alt='cgit logo'/></a></td>
<td class='main'><a href='/'>index</a> : <a href='/guix/'>guix</a></td><td class='form'><form method='get'>
<input type='hidden' name='id' value='1bd44b425b79e9da160b33a9b19d01973b44772e'/><select name='h' onchange='this.form.submit();'>
<option value='koszko' selected='selected'>koszko</option>
<option value='koszko-scripts'>koszko-scripts</option>
</select> <input type='submit' value='switch'/></form></td></tr>
<tr><td class='sub'>Wojtek's customized Guix</td><td class='sub right'</td></tr></table>
<table class='tabs'><tr><td>
<a class='active' href='/guix/about/'>about</a><a href='/guix/'>summary</a><a href='/guix/refs/?id=1bd44b425b79e9da160b33a9b19d01973b44772e'>refs</a><a href='/guix/log/'>log</a><a href='/guix/tree/?id=1bd44b425b79e9da160b33a9b19d01973b44772e'>tree</a><a href='/guix/commit/?id=1bd44b425b79e9da160b33a9b19d01973b44772e'>commit</a><a href='/guix/diff/?id=1bd44b425b79e9da160b33a9b19d01973b44772e'>diff</a></td><td class='form'><form class='right' method='get' action='/guix/log/'>
<input type='hidden' name='id' value='1bd44b425b79e9da160b33a9b19d01973b44772e'/><select name='qt'>
<option value='grep'>log msg</option>
<option value='author'>author</option>
<option value='committer'>committer</option>
<option value='range'>range</option>
</select>
<input class='txt' type='search' size='10' name='q' value=''/>
<input type='submit' value='search'/>
</form>
</td></tr></table>
<div class='content'><div id='summary'><pre>
Do not attempt to dlopen PIE objects, which was disallowed with glibc 2.30.

https://gitlab.haskell.org/ghc/ghc/issues/17952
https://sourceware.org/bugzilla/show_bug.cgi?id=24323

Patch submitted upstream:
https://gitlab.haskell.org/ghc/ghc/-/merge_requests/2947

diff --git a/testsuite/tests/dynlibs/Makefile b/testsuite/tests/dynlibs/Makefile
--- a/testsuite/tests/dynlibs/Makefile
+++ b/testsuite/tests/dynlibs/Makefile
@@ -60,6 +60,4 @@ T5373:
 .PHONY: T13702
 T13702:
 	&apos;$(TEST_HC)&apos; -v0 -dynamic -rdynamic -fPIC -pie T13702.hs
-	&apos;$(TEST_HC)&apos; -v0 -dynamic T13702a.hs
-	./T13702  # first make sure executable itself works
-	./T13702a # then try dynamically loading it as library
+	./T13702
diff --git a/testsuite/tests/dynlibs/T13702.hs b/testsuite/tests/dynlibs/T13702.hs
--- a/testsuite/tests/dynlibs/T13702.hs
+++ b/testsuite/tests/dynlibs/T13702.hs
@@ -2,8 +2,3 @@
 
 main :: IO ()
 main = putStrLn &quot;hello world&quot;
-
-foreign export ccall &quot;hello&quot; hello :: IO ()
-
-hello :: IO ()
-hello = putStrLn &quot;hello world again&quot;
diff --git a/testsuite/tests/dynlibs/T13702.stdout b/testsuite/tests/dynlibs/T13702.stdout
--- a/testsuite/tests/dynlibs/T13702.stdout
+++ b/testsuite/tests/dynlibs/T13702.stdout
@@ -1,2 +1 @@
 hello world
-hello world again
diff --git a/testsuite/tests/dynlibs/T13702a.hs b/testsuite/tests/dynlibs/T13702a.hs
deleted file mode 100644
--- a/testsuite/tests/dynlibs/T13702a.hs
+++ /dev/null
@@ -1,12 +0,0 @@
-{-# LANGUAGE ForeignFunctionInterface #-}
-
-import Foreign
-import System.Posix.DynamicLinker
-
-main :: IO ()
-main = do
-    dl &lt;- dlopen &quot;./T13702&quot; [RTLD_NOW]
-    funptr &lt;- dlsym dl &quot;hello&quot; :: IO (FunPtr (IO ()))
-    mkAction funptr
-
-foreign import ccall &quot;dynamic&quot; mkAction :: FunPtr (IO ()) -&gt; IO ()
</pre>
</div></div> <!-- class=content -->
                         <div class=footer>generated by
                             <a href="https://git.zx2c4.com/cgit/about/">
                                 cgit
                             </a>
                         </div>
                        </div> <!-- id=cgit -->
</body>
</html>
