Opened 12 days ago

Last modified 12 days ago

#69935 new defect

x264 uses -mcpu=G4 when building on G5

Reported by: barracuda156 Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.9.3
Keywords: powerpc Cc: dbevans (David B. Evans)
Port: x264

Description

This is wrong:

--->  Configuring x264
Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x264/x264/work/x264-snapshot-20191217-2245-stable" && ./configure --prefix=/opt/local --enable-pic --enable-shared --enable-static --disable-avs --disable-swscale --disable-lavf --disable-ffms --disable-gpac --disable-lsmash --host=ppc-apple-darwin8 
platform:      PPC
byte order:    big-endian
system:        MACOSX
cli:           yes
libx264:       internal
shared:        yes
static:        yes
asm:           yes
interlaced:    yes
avs:           no
lavf:          no
ffms:          no
mp4:           no
gpl:           yes
thread:        posix
opencl:        yes
filters:       crop select_every
lto:           no
debug:         no
gprof:         no
strip:         no
PIC:           yes
bit depth:     all
chroma format: all

You can run 'make' or 'make fprofiled' now.
--->  Building x264
Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x264/x264/work/x264-snapshot-20191217-2245-stable" && gmake -j4 -w default 
gmake: Entering directory '/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x264/x264/work/x264-snapshot-20191217-2245-stable'
cat common/opencl/x264-cl.h common/opencl/bidir.cl common/opencl/downscale.cl common/opencl/intra.cl common/opencl/motionsearch.cl common/opencl/subpel.cl common/opencl/weightp.cl | ./tools/cltostr.sh common/oclobj.h
dependency file generation...
/opt/local/bin/gcc-apple-4.2 -Wshadow -O3 -ffast-math -pipe -I. -fno-common -read_only_relocs suppress -arch ppc -Wall -I. -I. -faltivec -fastf -mcpu=G4 -std=gnu99 -D_GNU_SOURCE -fPIC -fomit-frame-pointer -fno-tree-vectorize -c x264.c -o x264.o

Unfortunately, old Xcode gcc does not support native, so either a flag should be removed or, better, variants are to be added. Or if there is a way to check whether G4 or G5 is being used, then make it conditional.

Change History (2)

comment:1 in reply to:  description ; Changed 12 days ago by ryandesign (Ryan Carsten Schmidt)

Replying to barracuda156:

so either a flag should be removed or, better, variants are to be added. Or if there is a way to check whether G4 or G5 is being used, then make it conditional.

Don't make it conditional. If you do that, then archives built on G4 and G5 would differ yet there would be no evidence of that difference in the installed port version+revision+variants and if we were to ever have a PowerPC build machine again, then the archive it produced would not be right for users whose machines had a different processor. Do use variants.

comment:2 in reply to:  1 Changed 12 days ago by barracuda156

Replying to ryandesign:

Don't make it conditional. If you do that, then archives built on G4 and G5 would differ yet there would be no evidence of that difference in the installed port version+revision+variants and if we were to ever have a PowerPC build machine again, then the archive it produced would not be right for users whose machines had a different processor. Do use variants.

Fair point.

Note: See TracTickets for help on using tickets.