Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
450c3588
Commit
450c3588
authored
Sep 29, 2023
by
Brendan Shanks
Committed by
Alexandre Julliard
Oct 02, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
configure: Don't use -Wl,-z,defs if it causes link errors with 'environ'.
Fixes undefined reference link error in msv1_0 on FreeBSD. Reported by Gerald Pfeifer.
parent
a084fd05
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
17 deletions
+23
-17
configure
configure
+14
-16
configure.ac
configure.ac
+9
-1
No files found.
configure
View file @
450c3588
...
@@ -10102,34 +10102,32 @@ fi
...
@@ -10102,34 +10102,32 @@ fi
LDDLLFLAGS
=
"-fPIC"
;;
LDDLLFLAGS
=
"-fPIC"
;;
esac
esac
{
printf
"%s
\n
"
"
$as_me
:
${
as_lineno
-
$LINENO
}
: checking whether
the compiler supports -Wl,-z,defs
"
>
&5
{
printf
"%s
\n
"
"
$as_me
:
${
as_lineno
-
$LINENO
}
: checking whether
-Wl,-z,defs works correctly
"
>
&5
printf
%s
"checking whether
the compiler supports -Wl,-z,defs
... "
>
&6
;
}
printf
%s
"checking whether
-Wl,-z,defs works correctly
... "
>
&6
;
}
if
test
${
ac_cv_
cflags__Wl_
_z_defs
+y
}
if
test
${
ac_cv_
wl
_z_defs
+y
}
then
:
then
:
printf
%s
"(cached) "
>
&6
printf
%s
"(cached) "
>
&6
else
$as_nop
else
$as_nop
ac_
wine_try_cflags_saved
=
$CFLAGS
ac_
save_CFLAGS
=
"
$CFLAGS
"
CFLAGS
=
"
$C
FLAGS
-Wl,-z,defs"
CFLAGS
=
"
$CFLAGS
$UNIXDLLFLAGS
$UNIXLD
FLAGS
-Wl,-z,defs"
cat
confdefs.h -
<<
_ACEOF
>conftest.
$ac_ext
cat
confdefs.h -
<<
_ACEOF
>conftest.
$ac_ext
/* end confdefs.h. */
/* end confdefs.h. */
int main(int argc, char **argv) { return 0
; }
extern char **environ; char **envp; void myfunc(void) { envp = environ
; }
_ACEOF
_ACEOF
if
ac_fn_c_try_link
"
$LINENO
"
if
ac_fn_c_try_link
"
$LINENO
"
then
:
then
:
ac_cv_
cflags__Wl_
_z_defs
=
yes
ac_cv_
wl
_z_defs
=
yes
else
$as_nop
else
$as_nop
ac_cv_
cflags__Wl_
_z_defs
=
no
ac_cv_
wl
_z_defs
=
no
fi
fi
rm
-f
core conftest.err conftest.
$ac_objext
conftest.beam
\
rm
-f
core conftest.err conftest.
$ac_objext
conftest.beam
\
conftest
$ac_exeext
conftest.
$ac_ext
conftest
$ac_exeext
conftest.
$ac_ext
CFLAGS
=
$ac_wine_try_cflags_saved
CFLAGS
=
$ac_save_cflags
fi
{
printf
"%s
\n
"
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result:
$ac_cv_cflags__Wl__z_defs
"
>
&5
printf
"%s
\n
"
"
$ac_cv_cflags__Wl__z_defs
"
>
&6
;
}
if
test
"x
$ac_cv_cflags__Wl__z_defs
"
=
xyes
then
:
UNIXLDFLAGS
=
"
$UNIXLDFLAGS
-Wl,-z,defs"
fi
fi
{
printf
"%s
\n
"
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result:
$ac_cv_wl_z_defs
"
>
&5
printf
"%s
\n
"
"
$ac_cv_wl_z_defs
"
>
&6
;
}
test
$ac_cv_wl_z_defs
!=
yes
||
as_fn_append UNIXLDFLAGS
" -Wl,-z,defs"
{
printf
"%s
\n
"
"
$as_me
:
${
as_lineno
-
$LINENO
}
: checking whether the compiler supports -Wl,--export-dynamic"
>
&5
{
printf
"%s
\n
"
"
$as_me
:
${
as_lineno
-
$LINENO
}
: checking whether the compiler supports -Wl,--export-dynamic"
>
&5
printf
%s
"checking whether the compiler supports -Wl,--export-dynamic... "
>
&6
;
}
printf
%s
"checking whether the compiler supports -Wl,--export-dynamic... "
>
&6
;
}
if
test
${
ac_cv_cflags__Wl___export_dynamic
+y
}
if
test
${
ac_cv_cflags__Wl___export_dynamic
+y
}
...
...
configure.ac
View file @
450c3588
...
@@ -765,7 +765,15 @@ case $host_os in
...
@@ -765,7 +765,15 @@ case $host_os in
LDDLLFLAGS="-fPIC" ;;
LDDLLFLAGS="-fPIC" ;;
esac
esac
WINE_TRY_CFLAGS([-Wl,-z,defs],[UNIXLDFLAGS="$UNIXLDFLAGS -Wl,-z,defs"])
AC_CACHE_CHECK([whether -Wl,-z,defs works correctly], ac_cv_wl_z_defs,
[ac_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $UNIXDLLFLAGS $UNIXLDFLAGS -Wl,-z,defs"
dnl On FreeBSD, shared libraries using environ fail to link with -Wl,-z,defs
AC_LINK_IFELSE([AC_LANG_SOURCE([[extern char **environ; char **envp; void myfunc(void) { envp = environ; }]])],
[ac_cv_wl_z_defs=yes],[ac_cv_wl_z_defs=no])
CFLAGS=$ac_save_cflags])
test $ac_cv_wl_z_defs != yes || AS_VAR_APPEND([UNIXLDFLAGS],[" -Wl,-z,defs"])
WINE_TRY_CFLAGS([-Wl,--export-dynamic],[WINELOADER_LDFLAGS="-Wl,--export-dynamic"])
WINE_TRY_CFLAGS([-Wl,--export-dynamic],[WINELOADER_LDFLAGS="-Wl,--export-dynamic"])
WINEPRELOADER_LDFLAGS="-nostartfiles -nodefaultlibs"
WINEPRELOADER_LDFLAGS="-nostartfiles -nodefaultlibs"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment