[FFmpeg-cvslog] r19404 - in trunk: common.mak configure
Stefano Sabatini
stefano.sabatini-lala
Sun Jul 12 17:02:33 CEST 2009
On date Sunday 2009-07-12 15:29:32 +0200, mru wrote:
> Author: mru
> Date: Sun Jul 12 15:29:32 2009
> New Revision: 19404
>
> Log:
> Separate C preprocessor flags into CPPFLAGS variable
>
> Modified:
> trunk/common.mak
> trunk/configure
>
> Modified: trunk/common.mak
> ==============================================================================
> --- trunk/common.mak Sun Jul 12 15:22:01 2009 (r19403)
> +++ trunk/common.mak Sun Jul 12 15:29:32 2009 (r19404)
> @@ -18,16 +18,17 @@ endif
>
> ALLFFLIBS = avcodec avdevice avfilter avformat avutil postproc swscale
>
> -CFLAGS := -DHAVE_AV_CONFIG_H -I$(BUILD_ROOT_REL) -I$(SRC_PATH) $(OPTFLAGS)
> +CPPFLAGS += -DHAVE_AV_CONFIG_H -I$(BUILD_ROOT_REL) -I$(SRC_PATH)
> +CFLAGS := $(OPTFLAGS)
>
> %.o: %.c
> - $(CC) $(CFLAGS) $(LIBOBJFLAGS) -c -o $@ $<
> + $(CC) $(CPPFLAGS) $(CFLAGS) $(LIBOBJFLAGS) -c -o $@ $<
>
> %.o: %.S
> - $(AS) $(CFLAGS) $(LIBOBJFLAGS) -c -o $@ $<
> + $(AS) $(CPPFLAGS) $(CFLAGS) $(LIBOBJFLAGS) -c -o $@ $<
>
> %.ho: %.h
> - $(CC) $(CFLAGS) $(LIBOBJFLAGS) -Wno-unused -c -o $@ -x c $<
> + $(CC) $(CPPFLAGS) $(CFLAGS) $(LIBOBJFLAGS) -Wno-unused -c -o $@ -x c $<
>
> %.d: %.c
> $(DEPEND_CMD) > $@
This is broken if the user has an installation of FFmpeg in the paths
in CPPFLAGS, this way the pre-installed headers are accessed *before*
the FFmpeg source headers, resulting in a compilation with the wrong
headers.
In particular it fails on my system, when I have:
stefano at geppetto ~/s/ffmpeg> make
/home/stefano/src/ffmpeg/version.sh "/home/stefano/src/ffmpeg" version.h
gcc -I/home/stefano/include -DHAVE_AV_CONFIG_H
-I. -I"/home/stefano/src/ffmpeg" -I/home/stefano/include -std=c99
-I/usr/include/schroedinger-1.0 -I/usr/include/liboil-0.3 -g3
-Wdeclaration-after-statement -Wall -Wno-switch
-Wdisabled-optimization -Wpointer-arith -Wredundant-decls
-Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wtype-limits -Wundef
-fno-math-errno -fno-signed-zeros -c -o libavfilter/allfilters.o
libavfilter/allfilters.c
cc1: warning: -funit-at-a-time is required for inlining of functions that are only called once
In file included from /home/stefano/include/libavutil/avutil.h:56,
from /home/stefano/include/libavcodec/avcodec.h:30,
from libavfilter/avfilter.h:38,
from libavfilter/allfilters.c:22:
/home/stefano/include/libavutil/common.h:284:26: error: internal.h: No such file or directory
make: *** [libavfilter/allfilters.o] Error 1
My proposal in attachment (BTW the changes to configure caused at
least two more compilation errors here).
Regards.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix-common-mak.patch
Type: text/x-diff
Size: 457 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-cvslog/attachments/20090712/1bec0ff8/attachment.patch>
More information about the ffmpeg-cvslog
mailing list