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
870f99ec
Commit
870f99ec
authored
Apr 05, 2019
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
configure: Check for supported warning flags also for the cross-compiler.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3e6a4c4a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
63 additions
and
1 deletion
+63
-1
Makefile.in
Makefile.in
+1
-0
aclocal.m4
aclocal.m4
+23
-0
configure
configure
+0
-0
configure.ac
configure.ac
+36
-0
makedep.c
tools/makedep.c
+3
-1
No files found.
Makefile.in
View file @
870f99ec
...
...
@@ -42,6 +42,7 @@ CFLAGS = @CFLAGS@
CPPFLAGS
=
@CPPFLAGS@
CROSSCFLAGS
=
@CROSSCFLAGS@
EXTRACFLAGS
=
@EXTRACFLAGS@
EXTRACROSSCFLAGS
=
@EXTRACROSSCFLAGS@
MSVCRTFLAGS
=
@BUILTINFLAG@
TARGETFLAGS
=
@TARGETFLAGS@
UNWINDFLAGS
=
@UNWINDFLAGS@
...
...
aclocal.m4
View file @
870f99ec
...
...
@@ -149,6 +149,29 @@ CFLAGS=$ac_wine_try_cflags_saved])
AS_VAR_IF([ac_var],[yes],[m4_default([$2], [EXTRACFLAGS="$EXTRACFLAGS $1"])], [$3])dnl
AS_VAR_POPDEF([ac_var])])
dnl **** Check if we can link an empty program with special CFLAGS ****
dnl
dnl Usage: WINE_TRY_CROSSCFLAGS(flags,[action-if-yes,[action-if-no]])
dnl
dnl The default action-if-yes is to append the flags to EXTRACROSSCFLAGS.
dnl
AC_DEFUN([WINE_TRY_CROSSCFLAGS],
[AS_VAR_PUSHDEF([ac_var], ac_cv_cflags_[[$1]])dnl
AC_CACHE_CHECK([whether the cross-compiler supports $1], ac_var,
[ac_wine_try_cflags_saved=$CFLAGS
ac_wine_try_cflags_saved_cc=$CC
ac_wine_try_cflags_saved_exeext=$ac_exeext
CFLAGS="$CFLAGS $1"
CC="$CROSSCC"
ac_exeext=".exe"
AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(int argc, char **argv) { return 0; }]])],
[AS_VAR_SET(ac_var,yes)], [AS_VAR_SET(ac_var,no)])
CFLAGS=$ac_wine_try_cflags_saved
CC=$ac_wine_try_cflags_saved_cc
ac_exeext=$ac_wine_try_cflags_saved_exeext])
AS_VAR_IF([ac_var],[yes],[m4_default([$2], [EXTRACROSSCFLAGS="$EXTRACROSSCFLAGS $1"])], [$3])dnl
AS_VAR_POPDEF([ac_var])])
dnl **** Check if we can link an empty shared lib (no main) with special CFLAGS ****
dnl
dnl Usage: WINE_TRY_SHLIB_FLAGS(flags,[action-if-yes,[action-if-no]])
...
...
configure
View file @
870f99ec
This diff is collapsed.
Click to expand it.
configure.ac
View file @
870f99ec
...
...
@@ -1019,6 +1019,42 @@ then
[AC_MSG_RESULT([no])])
CC="$ac_save_CC"
AC_SUBST(CROSSCFLAGS,${CROSSCFLAGS:-$CFLAGS})
AC_SUBST(EXTRACROSSCFLAGS,"-DWINE_CROSSTEST -Wall")
dnl clang needs to be told to fail on unknown options
saved_CFLAGS=$CFLAGS
WINE_TRY_CROSSCFLAGS([-fno-strict-aliasing])
WINE_TRY_CROSSCFLAGS([-Werror=unknown-warning-option])
WINE_TRY_CROSSCFLAGS([-Wdeclaration-after-statement])
WINE_TRY_CROSSCFLAGS([-Wempty-body])
WINE_TRY_CROSSCFLAGS([-Wignored-qualifiers])
WINE_TRY_CROSSCFLAGS([-Wpacked-not-aligned],[EXTRACROSSCFLAGS="$EXTRACROSSCFLAGS -Wno-packed-not-aligned"])
WINE_TRY_CROSSCFLAGS([-Wpragma-pack],[EXTRACROSSCFLAGS="$EXTRACROSSCFLAGS -Wno-pragma-pack"])
WINE_TRY_CROSSCFLAGS([-Wshift-overflow=2])
WINE_TRY_CROSSCFLAGS([-Wstrict-prototypes])
WINE_TRY_CROSSCFLAGS([-Wtype-limits])
WINE_TRY_CROSSCFLAGS([-Wunused-but-set-parameter])
WINE_TRY_CROSSCFLAGS([-Wvla])
WINE_TRY_CROSSCFLAGS([-Wwrite-strings])
WINE_TRY_CROSSCFLAGS([-Wpointer-arith])
WINE_TRY_CROSSCFLAGS([-Wlogical-op])
case $host_cpu in
*i[[3456789]]86*) WINE_TRY_CROSSCFLAGS([-fno-omit-frame-pointer]) ;;
x86_64) WINE_TRY_CROSSCFLAGS([-Wno-format]) ;;
esac
CFLAGS=$saved_CFLAGS
dnl Default to dwarf-2 debug info
for ac_flag in $CFLAGS; do
case $ac_flag in
-g) WINE_TRY_CROSSCFLAGS([-gdwarf-2])
WINE_TRY_CROSSCFLAGS([-gstrict-dwarf]) ;;
esac
done
test "x$enable_maintainer_mode" != "xyes" || WINE_TRY_CROSSCFLAGS([-Werror])
fi
fi
WINE_NOTICE_WITH(mingw,[test "x$CROSSTARGET" = "x"],
...
...
tools/makedep.c
View file @
870f99ec
...
...
@@ -132,6 +132,7 @@ static struct strarray dll_flags;
static
struct
strarray
target_flags
;
static
struct
strarray
msvcrt_flags
;
static
struct
strarray
extra_cflags
;
static
struct
strarray
extra_cross_cflags
;
static
struct
strarray
cpp_flags
;
static
struct
strarray
unwind_flags
;
static
struct
strarray
libs
;
...
...
@@ -2958,7 +2959,7 @@ static void output_source_default( struct makefile *make, struct incl_file *sour
output_filenames
(
make
->
define_args
);
output_filenames
(
extradefs
);
if
(
make
->
use_msvcrt
)
output_filenames
(
msvcrt_flags
);
output_filename
(
"-DWINE_CROSSTEST"
);
output_filename
s
(
extra_cross_cflags
);
output_filenames
(
cpp_flags
);
output_filename
(
"$(CROSSCFLAGS)"
);
output
(
"
\n
"
);
...
...
@@ -4200,6 +4201,7 @@ int main( int argc, char *argv[] )
msvcrt_flags
=
get_expanded_make_var_array
(
top_makefile
,
"MSVCRTFLAGS"
);
dll_flags
=
get_expanded_make_var_array
(
top_makefile
,
"DLLFLAGS"
);
extra_cflags
=
get_expanded_make_var_array
(
top_makefile
,
"EXTRACFLAGS"
);
extra_cross_cflags
=
get_expanded_make_var_array
(
top_makefile
,
"EXTRACROSSCFLAGS"
);
cpp_flags
=
get_expanded_make_var_array
(
top_makefile
,
"CPPFLAGS"
);
unwind_flags
=
get_expanded_make_var_array
(
top_makefile
,
"UNWINDFLAGS"
);
libs
=
get_expanded_make_var_array
(
top_makefile
,
"LIBS"
);
...
...
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