r19609 - in trunk: common.mak configure
Author: mru Date: Sat Aug 8 20:27:27 2009 New Revision: 19609 Log: Generate dependencies while compiling if supported by compiler Modified: trunk/common.mak trunk/configure Modified: trunk/common.mak ============================================================================== --- trunk/common.mak Sat Aug 8 20:27:22 2009 (r19608) +++ trunk/common.mak Sat Aug 8 20:27:27 2009 (r19609) @@ -21,12 +21,12 @@ ALLFFLIBS = avcodec avdevice avfilter av CPPFLAGS := -DHAVE_AV_CONFIG_H -I$(BUILD_ROOT_REL) -I$(SRC_PATH) $(CPPFLAGS) %.o: %.c - $(DEPEND_CMD) - $(CC) $(CPPFLAGS) $(CFLAGS) $(LIBOBJFLAGS) -c $(CC_O) $< + $(CCDEP) + $(CC) $(CPPFLAGS) $(CFLAGS) $(CC_DEPFLAGS) $(LIBOBJFLAGS) -c $(CC_O) $< %.o: %.S - $(DEPEND_CMD) - $(AS) $(CPPFLAGS) $(ASFLAGS) $(LIBOBJFLAGS) -c -o $@ $< + $(ASDEP) + $(AS) $(CPPFLAGS) $(ASFLAGS) $(AS_DEPFLAGS) $(LIBOBJFLAGS) -c -o $@ $< %.ho: %.h $(CC) $(CPPFLAGS) $(CFLAGS) $(LIBOBJFLAGS) -Wno-unused -c -o $@ -x c $< Modified: trunk/configure ============================================================================== --- trunk/configure Sat Aug 8 20:27:22 2009 (r19608) +++ trunk/configure Sat Aug 8 20:27:27 2009 (r19609) @@ -1510,8 +1510,12 @@ filter_asflags=echo if $cc --version 2>/dev/null | grep -qi gcc; then cc_type=gcc + CC_DEPFLAGS='-MMD' + AS_DEPFLAGS='-MMD' elif $cc --version 2>/dev/null | grep -q Intel; then cc_type=icc + CC_DEPFLAGS='-MMD' + AS_DEPFLAGS='-MMD' elif $cc -v 2>&1 | grep -q xlc; then cc_type=xlc elif $cc -V 2>/dev/null | grep -q Compaq; then @@ -1530,17 +1534,19 @@ elif $cc --vsn 2>/dev/null | grep -q RVC die "Error creating armcc configuration file." cc="$cc --arm_linux_config_file=$armcc_conf --translate_gcc" as_default="${cross_prefix}gcc" + CC_DEPFLAGS='-MMD' + AS_DEPFLAGS='-MMD' elif $cc -version 2>/dev/null | grep -q TMS470; then cc_type=tms470 cc="$cc --gcc --abi=eabi -eo=.o -mc -me" CC_O='-fr=$(@D)' as_default="${cross_prefix}gcc" ld_default="${cross_prefix}gcc" - dep_cc_default="${cross_prefix}gcc" TMPO=$(basename $TMPC .c).o append TMPFILES $TMPO add_cflags -D__gnuc_va_list=va_list -D__USER_LABEL_PREFIX__= - DEPFLAGS='$(CPPFLAGS) -MM' + CC_DEPFLAGS='-ppa -ppd=$(@:.o=.d)' + AS_DEPFLAGS='-MMD' filter_cflags=tms470_flags tms470_flags(){ for flag; do @@ -1574,6 +1580,9 @@ test -n "$cc_type" && enable $cc_type || : ${ld_default:=$cc} set_default as dep_cc ld +test -n "$CC_DEPFLAGS" || CCDEP=$DEPEND_CMD +test -n "$AS_DEPFLAGS" || ASDEP=$DEPEND_CMD + add_cflags $extra_cflags add_asflags $extra_cflags @@ -2611,8 +2620,11 @@ echo "SLIBPREF=$SLIBPREF" >> config.mak echo "SLIBSUF=$SLIBSUF" >> config.mak echo "EXESUF=$EXESUF" >> config.mak echo "EXTRA_VERSION=$extra_version" >> config.mak -echo "DEPEND_CMD=$DEPEND_CMD" >> config.mak echo "DEPFLAGS=$DEPFLAGS" >> config.mak +echo "CCDEP=$CCDEP" >> config.mak +echo "ASDEP=$ASDEP" >> config.mak +echo "CC_DEPFLAGS=$CC_DEPFLAGS" >> config.mak +echo "AS_DEPFLAGS=$AS_DEPFLAGS" >> config.mak echo "HOSTCC=$host_cc" >> config.mak echo "HOSTCFLAGS=$host_cflags" >> config.mak echo "HOSTEXESUF=$HOSTEXESUF" >> config.mak
mru <subversion at mplayerhq.hu> writes:
Author: mru Date: Sat Aug 8 20:27:27 2009 New Revision: 19609
Log: Generate dependencies while compiling if supported by compiler
This seems to have broken icc with ccache as used on FATE. I have no idea why. It works with icc here (no ccache). -- M?ns Rullg?rd mans at mansr.com
2009/8/8 M?ns Rullg?rd <mans at mansr.com>:
mru <subversion at mplayerhq.hu> writes:
Author: mru Date: Sat Aug ?8 20:27:27 2009 New Revision: 19609
Log: Generate dependencies while compiling if supported by compiler
This seems to have broken icc with ccache as used on FATE. ?I have no idea why. ?It works with icc here (no ccache).
This was fixed today on ccache git. http://gitweb.samba.org/?p=ccache.git;a=commitdiff;h=97b2778196df8afa05f88c7... Mike, you might want to update your ccache and re-enable it in the FATE icc configurations.
On Sat, 2009-08-08 at 20:27 +0200, mru wrote:
Log: Generate dependencies while compiling if supported by compiler
+ CC_DEPFLAGS='-MMD'
You should add -MP here. Without it 'make' will fail when you rename headers because the .d file has a now unsatisfiable dependency on the old header name. With -MP the compiler will add a phony target, so a "missing" header just triggers a recompile that will either update the dependencies or fail if it's a real error.
On Sun, Aug 09, 2009 at 05:05:27PM +0300, Uoti Urpala wrote:
On Sat, 2009-08-08 at 20:27 +0200, mru wrote:
Log: Generate dependencies while compiling if supported by compiler
+ CC_DEPFLAGS='-MMD'
You should add -MP here. Without it 'make' will fail when you rename headers because the .d file has a now unsatisfiable dependency on the old header name. With -MP the compiler will add a phony target, so a "missing" header just triggers a recompile that will either update the dependencies or fail if it's a real error.
Mans? Diego
participants (5)
-
diego@biurrun.de -
mans@mansr.com -
ramiro.polla@gmail.com -
subversion@mplayerhq.hu -
uoti.urpala@pp1.inet.fi