[FFmpeg-devel] [PATCHv2] configure: warn if GCC 4.2 is being used
Ganesh Ajjanagadde
gajjanagadde at gmail.com
Mon Aug 24 13:31:13 CEST 2015
The wiki, Ticket1464, and Ticket3970 warn about the usage of GCC 4.2.
This fixes Ticket3970.
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
---
configure | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/configure b/configure
index e67ddf6..04a36e7 100755
--- a/configure
+++ b/configure
@@ -3544,6 +3544,7 @@ tms470_flags(){
probe_cc(){
pfx=$1
_cc=$2
+ first=$3
unset _type _ident _cc_c _cc_e _cc_o _flags _cflags
unset _ld_o _ldflags _ld_lib _ld_path
@@ -3569,6 +3570,10 @@ probe_cc(){
if ! $_cc -dumpversion | grep -q '^2\.'; then
_depflags='-MMD -MF $(@:.o=.d) -MT $@'
fi
+ if [ "$first" = true ] && $_cc -dumpversion | grep -q '^4\.2'; then
+ warn "gcc 4.2 is outdated and may miscompile FFmpeg. Please use a newer compiler."
+ warn "See https://trac.ffmpeg.org/ticket/1464 for more details."
+ fi
_cflags_speed='-O3'
_cflags_size='-Os'
elif $_cc --version 2>/dev/null | grep -q ^icc; then
@@ -3731,7 +3736,7 @@ set_ccvars(){
fi
}
-probe_cc cc "$cc"
+probe_cc cc "$cc" "true"
cflags_filter=$_flags_filter
cflags_speed=$_cflags_speed
cflags_size=$_cflags_size
--
2.5.0
More information about the ffmpeg-devel
mailing list