On Mon, Nov 23, 2015 at 05:08:49PM -0500, Alexandre Lision wrote:
> From: Luca Barbato <[email protected]>
> 
> Assumes that the C compiler and the ObjC compiler do match for now
> (default for OSX) and adds the ability to add ObjC-specific cflags
> (e.g. -fobjc-arc).

The character mumbojumbo ObjC stands for Objective C I assume?
Please let's communicate in full words and sentences.

> --- a/Makefile
> +++ b/Makefile
> @@ -1,6 +1,7 @@
>  include config.mak
>  
>  vpath %.c    $(SRC_PATH)
> +vpath %.m    $(SRC_PATH)
>  vpath %.h    $(SRC_PATH)
>  vpath %.S    $(SRC_PATH)
>  vpath %.asm  $(SRC_PATH)
> @@ -26,6 +27,8 @@ IFLAGS     := -I. -I$(SRC_PATH)
>  CPPFLAGS   := $(IFLAGS) $(CPPFLAGS)
>  CFLAGS     += $(ECFLAGS)
>  CCFLAGS     = $(CPPFLAGS) $(CFLAGS)
> +OBJCFLAGS  += $(EOBJCFLAGS)
> +OBJCCFLAGS  = $(CPPFLAGS) $(CFLAGS) $(OBJCFLAGS)
>  ASFLAGS    := $(CPPFLAGS) $(ASFLAGS)
>  YASMFLAGS  += $(IFLAGS:%=%/) -Pconfig.asm
>  HOSTCCFLAGS = $(IFLAGS) $(HOSTCPPFLAGS) $(HOSTCFLAGS)
> @@ -38,6 +41,7 @@ endef
>  
>  COMPILE_C = $(call COMPILE,CC)
>  COMPILE_S = $(call COMPILE,AS)
> +COMPILE_M = $(call COMPILE,OBJCC)
>  COMPILE_HOSTC = $(call COMPILE,HOSTCC)
>  
>  %.o: %.c
> @@ -46,6 +50,9 @@ COMPILE_HOSTC = $(call COMPILE,HOSTCC)
>  %.o: %.S
>       $(COMPILE_S)
>  
> +%.o: %.m
> +     $(COMPILE_M)
> +
>  %_host.o: %.c
>       $(COMPILE_HOSTC)

The placement before or after the Assembly bits is pretty random, please try
to be consistent.

> --- a/configure
> +++ b/configure
> @@ -749,6 +755,13 @@ check_cc(){
>      check_cmd $cc $CPPFLAGS $CFLAGS "$@" $CC_C $(cc_o $TMPO) $TMPC
>  }
>  
> +check_objcc(){
> +    log check_objcc "$@"
> +    cat > $TMPC
> +    log_file $TMPC
> +    check_cmd $objcc $CPPFLAGS $CFLAGS $OBJCFLAGS "$@" $OBJCC_C $(cc_o 
> $TMPO) $TMPC

Still using C compiler variables.

> @@ -847,6 +860,19 @@ check_cflags(){
>  
> +test_objcflags(){
> +    log test_cflags "$@"
> +    set -- $($cflags_filter "$@")
> +    check_objcc "$@" <<EOF
> +int x;
> +EOF
> +}

I wonder about filtering flags for the C compiler here.

> +check_objcflags(){
> +    log check_cflags "$@"

Nope.

> @@ -1710,6 +1736,7 @@ CMDLINE_SET="
>      as
>      build_suffix
>      cc
> +    objcc
>      cpu
>      cross_prefix
>      custom_allocator

Please, this was alphabetically sorted.

> @@ -2733,6 +2764,7 @@ fi
>  
>  ar_default="${cross_prefix}${ar_default}"
>  cc_default="${cross_prefix}${cc_default}"
> +occ_default="${cross_prefix}${occ_default}"

Wasn't that objcc?

> @@ -3179,16 +3211,22 @@ test -n "$cc_type" && enable $cc_type ||
>  
> +probe_cc objcc "$objcc"
> +objcflags_filter=$_flags_filter
> +add_objcflags $_flags $_cflags
> +set_ccvars OBJC
> +
>  probe_cc ld "$ld"
>  ldflags_filter=$_flags_filter
>  add_ldflags $_flags $_ldflags
> @@ -4972,7 +5011,9 @@ CC_IDENT=$cc_ident
>  ARCH=$arch
>  INTRINSICS=$intrinsics
>  CC=$cc
> +OBJCC=$cc
>  AS=$as
> +OBJCC=$objcc
>  LD=$ld
>  DEPCC=$dep_cc
>  DEPCCFLAGS=$DEPCCFLAGS \$(CPPFLAGS)

Looks like objcc here.

Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to