../../doltlibtool --tag=CC --mode=compile cc -DHAVE_CONFIG_H -I. -I../.. -DMODULE_NAME=$(p="libdynamicoverlay_plugin_la-dynamicoverlay_buffer.lo"; p="${p##*/}"; p="${p#lib}"; echo "${p%_plugin*}") -DMODULE_NAME_IS_$(p="libdynamicoverlay_plugin_la-dynamicoverlay_buffer.lo"; p="${p##*/}"; p="${p#lib}"; echo "${p%_plugin*}") -DMODULE_STRING=\"$(p="libdynamicoverlay_plugin_la-dynamicoverlay_buffer.lo"; p="${p##*/}"; p="${p#lib}"; echo "${p%_plugin*}")\" -D__PLUGIN__ -I../../include -I../../include -I/usr/local/include/gnutls3 -I/usr/local/include -DLIBICONV_PLUG -O2 -pipe -march=corei7 -DLIBICONV_PLUG -fno-strict-aliasing -Wall -Wextra -Wsign-compare -Wundef -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wmissing-prototypes -Wvolatile-register-var -Werror-implicit-function-declaration -pipe -fvisibility=hidden -MT libdynamicoverlay_plugin_la-dynamicoverlay_buffer.lo -MD -MP -MF .deps/libdynamicoverlay_plugin_la-dynamicoverlay_buffer.Tpo -c -o libdynamicoverlay_plugin_la-dynamicoverlay_buffer.lo `test -f 'dynamicoverlay/dynamicoverlay_buffer.c' || echo './'`dynamicoverlay/dynamicoverlay_buffer.c In file included from deinterlace/algo_yadif.c:48: In file included from deinterlace/yadif.h:49: deinterlace/yadif_template.h:262:9: error: inline assembly requires more registers than available FILTER ^ deinterlace/yadif_template.h:135:13: note: expanded from macro 'FILTER' "pxor "MM"7, "MM"7 \n\t"\ ^ deinterlace/yadif_template.h:256:9: error: inline assembly requires more registers than available FILTER ^ deinterlace/yadif_template.h:135:13: note: expanded from macro 'FILTER' "pxor "MM"7, "MM"7 \n\t"\ ^ 3 warnings and 2 errors generated. deinterlace/algo_ivtc.c:gmake[6]: 179:30: warning: *** [libdeinterlace_plugin_la-algo_yadif.lo] Error 1 unused gmake[6]: variable 'pi_worst_field_pairs' [-Wunused-const-variable] *** Waiting for unfinished jobs.... static const ivtc_field_pair pi_worst_field_pairs[NUM_CADENCE_POS][4] = { ^ mv -f .deps/libdynamicoverlay_plugin_la-dynamicoverlay_buffer.Tpo .deps/libdynamicoverlay_plugin_la-dynamicoverlay_buffer.Plo 1 warning generated. mv -f .deps/libdeinterlace_plugin_la-algo_ivtc.Tpo .deps/libdeinterlace_plugin_la-algo_ivtc.Plo gmake[6]: Leaving directory `/usr/ports/multimedia/vlc/work/vlc-2.1.4/modules/video_filter' clang well-known registers trouble VDPAU option should be enabled. It applies also to some VDPAU-ports (ffmpeg, mplayer, etc)
Can you include the preprocessed file and the -cc1 command line?
(In reply to comment #1) > Can you include the preprocessed file and the -cc1 command line? Point me, please, howto find preprocessed file and discover -cc1 command line? Could you interact with maintainer directly? http://www.videolan.org/vlc/ NB It compiles with OPTIMIZED_FLAGS option enabled.
If you add -v -save-temps to the clang command line it should give you both.
another thing is that it fails on i386, but amd64 ../../doltlibtool --tag=CC --mode=link cc -I/usr/local/include -O2 -pipe -march=corei7 -DLIBICONV_PLUG -fno-strict-aliasing -Wall -Wextra -Wsign-compare -Wundef -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wmissing-prototypes -Wvolatile-register-var -Werror-implicit-function-declaration -pipe -fvisibility=hidden -rpath '/usr/local/lib/vlc/plugins/video_filter' -avoid-version -module -export-symbols-regex ^vlc_entry -shrext .so -no-undefined ../../compat/libcompat.la ../../src/libvlccore.la -Wl,-rpath=/usr/lib:/usr/local/lib -o libremoteosd_plugin.la -rpath /usr/local/lib/vlc/plugins/video_filter libremoteosd_plugin_la-remoteosd.lo -pthread -L/usr/local/lib -lgcrypt -lgpg-error In file included from deinterlace/algo_yadif.c:48: deinterlace/yadif.h:37:23: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier] DECLARE_ASM_CONST(16, const xmm_reg, pb_1) = {0x0101010101010101ULL, 0x0... ^ deinterlace/yadif.h:28:54: note: expanded from macro 'DECLARE_ASM_CONST' # define DECLARE_ASM_CONST(n,t,v) static const t __attribute__((us... ^ deinterlace/yadif.h:38:23: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier] DECLARE_ASM_CONST(16, const xmm_reg, pw_1) = {0x0001000100010001ULL, 0x0... ^ deinterlace/yadif.h:28:54: note: expanded from macro 'DECLARE_ASM_CONST' # define DECLARE_ASM_CONST(n,t,v) static const t __attribute__((us... ^ deinterlace/algo_yadif.c:129:20: warning: incompatible pointer types assigning to 'void (*)(uint8_t *, uint8_t *, uint8_t *, uint8_t *, int, int, int, int, int)' from 'void (uint16_t *, uint16_t *, uint16_t *, uint16_t *, int, int, int, int, int)' [-Wincompatible-pointer-types] filter = yadif_filter_line_c_16bit; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from deinterlace/algo_yadif.c:48: In file included from deinterlace/yadif.h:49: deinterlace/yadif_template.h:262:9: error: inline assembly requires more registers than available FILTER ^ deinterlace/yadif_template.h:135:13: note: expanded from macro 'FILTER' "pxor "MM"7, "MM"7 \n\t"\ ^ deinterlace/yadif_template.h:256:9: error: inline assembly requires more registers than available FILTER ^ deinterlace/yadif_template.h:135:13: note: expanded from macro 'FILTER' "pxor "MM"7, "MM"7 \n\t"\ ^
what is the name of preprocessed file? (In reply to comment #3) > If you add -v -save-temps to the clang command line it should give you both.
(In reply to comment #5) > what is the name of preprocessed file? > It is the .i file you see in the verbose output when you add -v -save-temps to the command line.
(In reply to comment #6) > (In reply to comment #5) > > what is the name of preprocessed file? > > > > > It is the .i file you see in the verbose output when you add -v -save-temps > to the command line. gmake[6]: Entering directory `/usr/ports/multimedia/vlc/work/vlc-2.1.4/modules/video_filter' ../../doltlibtool --tag=CC --mode=compile cc -DHAVE_CONFIG_H -I. -I../.. -DMODULE_NAME=$(p="libdeinterlace_plugin_la-algo_yadif.lo"; p="${p##*/}"; p="${p#lib}"; echo "${p%_plugin*}") -DMODULE_NAME_IS_$(p="libdeinterlace_plugin_la-algo_yadif.lo"; p="${p##*/}"; p="${p#lib}"; echo "${p%_plugin*}") -DMODULE_STRING=\"$(p="libdeinterlace_plugin_la-algo_yadif.lo"; p="${p##*/}"; p="${p#lib}"; echo "${p%_plugin*}")\" -D__PLUGIN__ -v -save-temps -I../../include -I../../include -I/usr/local/include/gnutls3 -I/usr/local/include -DLIBICONV_PLUG -O2 -v -save-temps -O2 -pipe -march=corei7 -DLIBICONV_PLUG -fno-strict-aliasing -Wall -Wextra -Wsign-compare -Wundef -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wmissing-prototypes -Wvolatile-register-var -Werror-implicit-function-declaration -pipe -fvisibility=hidden -MT libdeinterlace_plugin_la-algo_yadif.lo -MD -MP -MF .deps/libdeinterlace_plugin_la-algo_yadif.Tpo -c -o libdeinterlace_plugin_la-algo_yadif.lo `test -f 'deinterlace/algo_yadif.c' || echo './'`deinterlace/algo_yadif.c ../../doltlibtool --tag=CC --mode=link cc -v -save-temps -O2 -pipe -march=corei7 -DLIBICONV_PLUG -fno-strict-aliasing -Wall -Wextra -Wsign-compare -Wundef -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wmissing-prototypes -Wvolatile-register-var -Werror-implicit-function-declaration -pipe -fvisibility=hidden -rpath '/usr/local/lib/vlc/plugins/video_filter' -avoid-version -module -export-symbols-regex ^vlc_entry -shrext .so -no-undefined ../../compat/libcompat.la ../../src/libvlccore.la -Wl,-rpath=/usr/lib:/usr/local/lib -o libpuzzle_plugin.la -rpath /usr/local/lib/vlc/plugins/video_filter libpuzzle_plugin_la-puzzle.lo libpuzzle_plugin_la-puzzle_bezier.lo libpuzzle_plugin_la-puzzle_lib.lo libpuzzle_plugin_la-puzzle_mgt.lo libpuzzle_plugin_la-puzzle_pce.lo -pthread ../../doltlibtool --tag=CC --mode=compile cc -DHAVE_CONFIG_H -I. -I../.. -DMODULE_NAME=$(p="libadjust_plugin_la-adjust_sat_hue.lo"; p="${p##*/}"; p="${p#lib}"; echo "${p%_plugin*}") -DMODULE_NAME_IS_$(p="libadjust_plugin_la-adjust_sat_hue.lo"; p="${p##*/}"; p="${p#lib}"; echo "${p%_plugin*}") -DMODULE_STRING=\"$(p="libadjust_plugin_la-adjust_sat_hue.lo"; p="${p##*/}"; p="${p#lib}"; echo "${p%_plugin*}")\" -D__PLUGIN__ -v -save-temps -I../../include -I../../include -I/usr/local/include/gnutls3 -I/usr/local/include -DLIBICONV_PLUG -v -save-temps -O2 -pipe -march=corei7 -DLIBICONV_PLUG -fno-strict-aliasing -Wall -Wextra -Wsign-compare -Wundef -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wmissing-prototypes -Wvolatile-register-var -Werror-implicit-function-declaration -pipe -fvisibility=hidden -MT libadjust_plugin_la-adjust_sat_hue.lo -MD -MP -MF .deps/libadjust_plugin_la-adjust_sat_hue.Tpo -c -o libadjust_plugin_la-adjust_sat_hue.lo `test -f 'adjust_sat_hue.c' || echo './'`adjust_sat_hue.c FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512 Target: i386-unknown-freebsd11.0 Thread model: posix Selected GCC installation: "/usr/bin/cc" -cc1 -triple i386-unknown-freebsd11.0 -E -disable-free -main-file-name algo_yadif.c -mrelocation-model pic -pic-level 2 -mdisable-fp-elim -relaxed-aliasing -masm-verbose -mconstructor-aliases -target-cpu corei7 -v -v -coverage-file /usr/ports/multimedia/vlc/work/vlc-2.1.4/modules/video_filter/algo_yadif.i -resource-dir /usr/bin/../lib/clang/3.4.1 -dependency-file .deps/libdeinterlace_plugin_la-algo_yadif.Tpo -sys-header-deps -MP -MT libdeinterlace_plugin_la-algo_yadif.lo -D HAVE_CONFIG_H -D MODULE_NAME=deinterlace -D MODULE_NAME_IS_deinterlace -D "MODULE_STRING=\"deinterlace\"" -D __PLUGIN__ -D LIBICONV_PLUG -D LIBICONV_PLUG -D PIC -I . -I ../.. -I ../../include -I ../../include -I /usr/local/include/gnutls3 -I /usr/local/include -O2 -Wall -Wextra -Wsign-compare -Wundef -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wmissing-prototypes -Wvolatile-register-var -Werror-implicit-function-declaration -fconst-strings -fdebug-compilation-dir /usr/ports/multimedia/vlc/work/vlc-2.1.4/modules/video_filter -ferror-limit 19 -fmessage-length 80 -fvisibility hidden -mstackrealign -fobjc-runtime=gnustep -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp -o algo_yadif.i -x c deinterlace/algo_yadif.c clang -cc1 version 3.4.1 based upon LLVM 3.4.1 default target i386-unknown-freebsd11.0 ignoring nonexistent directory "/usr/bin/../lib/clang/3.4.1/includeFreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512" ignoring duplicate directory "../../include" #include "..." search starts here: #include <...> search starts here: . ../.. ../../include /usr/local/include/gnutls3 /usr/local/include /usr/include/clang/3.4.1 /usr/include End of search list. Target: i386-unknown-freebsd11.0 Thread model: posix Selected GCC installation: "/usr/bin/cc" -cc1 -triple i386-unknown-freebsd11.0 -E -disable-free -main-file-name adjust_sat_hue.c -mrelocation-model pic -pic-level 2 -mdisable-fp-elim -relaxed-aliasing -masm-verbose -mconstructor-aliases -target-cpu corei7 -v -v -coverage-file /usr/ports/multimedia/vlc/work/vlc-2.1.4/modules/video_filter/adjust_sat_hue.i -resource-dir /usr/bin/../lib/clang/3.4.1 -dependency-file .deps/libadjust_plugin_la-adjust_sat_hue.Tpo -sys-header-deps -MP -MT libadjust_plugin_la-adjust_sat_hue.lo -D HAVE_CONFIG_H -D MODULE_NAME=adjust -D MODULE_NAME_IS_adjust -D "MODULE_STRING=\"adjust\"" -D __PLUGIN__ -D LIBICONV_PLUG -D LIBICONV_PLUG -D PIC -I . -I ../.. -I ../../include -I ../../include -I /usr/local/include/gnutls3 -I /usr/local/include -O2 -Wall -Wextra -Wsign-compare -Wundef -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wmissing-prototypes -Wvolatile-register-var -Werror-implicit-function-declaration -fconst-strings -fdebug-compilation-dir /usr/ports/multimedia/vlc/work/vlc-2.1.4/modules/video_filter -ferror-limit 19 -fmessage-length 80 -fvisibility hidden -mstackrealign -fobjc-runtime=gnustep -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp -o adjust_sat_hue.i -x c adjust_sat_hue.c In file included from deinterlace/algo_yadif.c:26: ../../config.h:790:15: warning: unknown pragma in STDC namespace [-Wunknown-pragmas] # pragma STDC FP_CONTRACT ON ^ clang -cc1 version 3.4.1 based upon LLVM 3.4.1 default target i386-unknown-freebsd11.0 ignoring nonexistent directory "/usr/bin/../lib/clang/3.4.1/include" ignoring duplicate directory "../../include" #include "..." search starts here: #include <...> search starts here: . ../.. ../../include /usr/local/include/gnutls3 /usr/local/include /usr/include/clang/3.4.1 /usr/include End of search list. In file included from adjust_sat_hue.c:26: ../../config.h:790:15: warning: unknown pragma in STDC namespace [-Wunknown-pragmas] # pragma STDC FP_CONTRACT ON ^ In file included from deinterlace/algo_yadif.c:48: In file included from deinterlace/yadif.h:22: ../../config.h:790:15: warning: unknown pragma in STDC namespace [-Wunknown-pragmas] # pragma STDC FP_CONTRACT ON ^ 2 warnings generated. "/usr/bin/cc" -cc1 -triple i386-unknown-freebsd11.0 -S -disable-free -main-file-name algo_yadif.c -mrelocation-model pic -pic-level 2 -mdisable-fp-elim -relaxed-aliasing -masm-verbose -mconstructor-aliases -target-cpu corei7 -v -v -coverage-file /usr/ports/multimedia/vlc/work/vlc-2.1.4/modules/video_filter/algo_yadif.s -resource-dir /usr/bin/../lib/clang/3.4.1 -O2 -Wall -Wextra -Wsign-compare -Wundef -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wmissing-prototypes -Wvolatile-register-var -Werror-implicit-function-declaration -fconst-strings -fdebug-compilation-dir /usr/ports/multimedia/vlc/work/vlc-2.1.4/modules/video_filter -ferror-limit 19 -fmessage-length 80 -fvisibility hidden -mstackrealign -fobjc-runtime=gnustep -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp -o algo_yadif.s -x cpp-output algo_yadif.i clang -cc1 version 3.4.1 based upon LLVM 3.4.1 default target i386-unknown-freebsd11.0 ignoring nonexistent directory "/usr/bin/../lib/clang/3.4.1/include" #include "..." search starts here: #include <...> search starts here: /usr/include/clang/3.4.1 /usr/include End of search list. 1 warning generated. "/usr/bin/cc" -cc1 -triple i386-unknown-freebsd11.0 -S -disable-free -main-file-name adjust_sat_hue.c -mrelocation-model pic -pic-level 2 -mdisable-fp-elim -relaxed-aliasing -masm-verbose -mconstructor-aliases -target-cpu corei7 -v -v -coverage-file /usr/ports/multimedia/vlc/work/vlc-2.1.4/modules/video_filter/adjust_sat_hue.s -resource-dir /usr/bin/../lib/clang/3.4.1 -O2 -Wall -Wextra -Wsign-compare -Wundef -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wmissing-prototypes -Wvolatile-register-var -Werror-implicit-function-declaration -fconst-strings -fdebug-compilation-dir /usr/ports/multimedia/vlc/work/vlc-2.1.4/modules/video_filter -ferror-limit 19 -fmessage-length 80 -fvisibility hidden -mstackrealign -fobjc-runtime=gnustep -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp -o adjust_sat_hue.s -x cpp-output adjust_sat_hue.i clang -cc1 version 3.4.1 based upon LLVM 3.4.1 default target i386-unknown-freebsd11.0 ignoring nonexistent directory "/usr/bin/../lib/clang/3.4.1/include" #include "..." search starts here: #include <...> search starts here: /usr/include/clang/3.4.1 /usr/include End of search list. In file included from deinterlace/algo_yadif.c:34: In file included from ../../include/vlc_picture.h:35: ../../include/vlc_atomic.h:361:138: warning: expression result unused [-Wunused-value] ...= __sync_val_compare_and_swap((&atom->u), _old, (v)); *_exp == _old; }); ~~~~~ ^ ~~~~ In file included from deinterlace/algo_yadif.c:48: deinterlace/yadif.h:37:14: warning: duplicate 'const' declarationIn file included from adjust_sat_hue.c:29: In file included from ../../include/vlc_filter.h:29: In file included from ../../include/vlc_picture.h:35: ../../include/vlc_atomic.h:361:138: warning: expression result unused [-Wunused-value] ...= __sync_val_compare_and_swap((&atom->u), _old, (v)); *_exp == _old; }); ~~~~~ ^ ~~~~ specifier [-Wduplicate-decl-specifier] static const const xmm_reg __attribute__((used)) __attribute__ ((aligne... ^ deinterlace/yadif.h:38:14: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier] static const const xmm_reg __attribute__((used)) __attribute__ ((aligne... ^ libtool: link: /usr/bin/nm -B .libs/libpuzzle_plugin_la-puzzle.o .libs/libpuzzle_plugin_la-puzzle_bezier.o .libs/libpuzzle_plugin_la-puzzle_lib.o .libs/libpuzzle_plugin_la-puzzle_mgt.o .libs/libpuzzle_plugin_la-puzzle_pce.o | sed -n -e 's/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p' | sed '/ __gnu_lto/d' | /usr/bin/sed 's/.* //' | sort | uniq > .libs/libpuzzle_plugin.exp deinterlace/algo_yadif.c:129:20: warning: incompatible pointer types assigning to 'void (*)(uint8_t *, uint8_t *, uint8_t *, uint8_t *, int, int, int, int, int)' from 'void (uint16_t *, uint16_t *, uint16_t *, uint16_t *, int, int, int, int, int)' [-Wincompatible-pointer-types] filter = yadif_filter_line_c_16bit; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from deinterlace/algo_yadif.c:48: In file included from deinterlace/yadif.h:49: deinterlace/yadif_template.h:262:48: error: inline assembly requires more registers than available deinterlace/yadif_template.h:256:48: error: inline assembly requires more registers than available 1 warning generated. 4 warnings and 2 errors generated. "/usr/bin/cc" -cc1as -triple i386-unknown-freebsd11.0 -filetype obj -main-file-name adjust_sat_hue.c -target-cpu corei7 -o .libs/libadjust_plugin_la-adjust_sat_hue.o adjust_sat_hue.s gmake[6]: *** [libdeinterlace_plugin_la-algo_yadif.lo] Error 1 gmake[6]: *** Waiting for unfinished jobs.... libtool: link: /usr/bin/egrep -e "^vlc_entry" ".libs/libpuzzle_plugin.exp" > ".libs/libpuzzle_plugin.expT" libtool: link: mv -f ".libs/libpuzzle_plugin.expT" ".libs/libpuzzle_plugin.exp" libtool: link: cc -shared -fPIC -DPIC .libs/libpuzzle_plugin_la-puzzle.o .libs/libpuzzle_plugin_la-puzzle_bezier.o .libs/libpuzzle_plugin_la-puzzle_lib.o .libs/libpuzzle_plugin_la-puzzle_mgt.o .libs/libpuzzle_plugin_la-puzzle_pce.o -Wl,-rpath -Wl,/usr/ports/multimedia/vlc/work/vlc-2.1.4/src/.libs -Wl,-rpath -Wl,/usr/local/lib -Wl,-rpath -Wl,/usr/local/lib ../../compat/.libs/libcompat.a ../../src/.libs/libvlccore.so -L/usr/local/lib /usr/local/lib/libidn.so /usr/local/lib/libintl.so -lm /usr/local/lib/libdbus-1.so -O2 -march=corei7 -Wl,-rpath=/usr/lib:/usr/local/lib -pthread -pthread -Wl,-soname -Wl,libpuzzle_plugin.so -Wl,-retain-symbols-file -Wl,.libs/libpuzzle_plugin.exp -o .libs/libpuzzle_plugin.so mv -f .deps/libadjust_plugin_la-adjust_sat_hue.Tpo .deps/libadjust_plugin_la-adjust_sat_hue.Plo libtool: link: ( cd ".libs" && rm -f "libpuzzle_plugin.la" && ln -s "../libpuzzle_plugin.la" "libpuzzle_plugin.la" ) gmake[6]: Leaving directory `/usr/ports/multimedia/vlc/work/vlc-2.1.4/modules/video_filter'
Created attachment 12630 [details] .i
(In reply to comment #8) > Created attachment 12630 [details] > .i The difference seems to be whether leaf frame pointer elimination is enabled or not. On linux I got similar results with gcc: $CC -c algo_yadif.i -std=gnu99 -m32 -O2 -w -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer -fPIC -> fails Allow leaf frame pointer omission and bot gcc and clang work. Roman, -momit-leaf-frame-pointer is enabled by default on linux. Should it be for 32 bit freebsd too?
It might be sensitive option, could you please contact clang freebsd maintainer brooks@FreeBSD.org? Thank you.
(In reply to comment #10) > It might be sensitive option, could you please contact clang freebsd > maintainer brooks@FreeBSD.org? > > Thank you. ccing him :-)
Frame pointer elimination is not on by default for FreeBSD i386 at all. Upstream gcc decided to switch it here: https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=163196 but in FreeBSD we have never upgraded beyond gcc 4.2.1, so we never got this change. Clang explicitly reflects that state, since this revision: http://llvm.org/viewvc/llvm-project?view=revision&revision=178606
Hello! Seven years later, still seeing this error, when attempting to build ffmpeg on FreeBSD-12/i386 -- with clang-10 and clang-12. See: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=257124 Any hope?
(In reply to Dimitry Andric from comment #12) > Clang explicitly reflects that state, since this revision: > > http://llvm.org/viewvc/llvm-project?view=revision&revision=178606 viewvc link dead, but this is: commit b7d97e95e845e3d1b4fe2eb00dcbd6efbc78be98 Author: Eric Christopher <echristo@gmail.com> Date: Wed Apr 3 01:58:53 2013 +0000 From PR9121 gcc defaulted to omitting the frame pointer on linux, however, it doesn't do that unless we're optimizing. Change that and haul out to a helper function. Also make this a driver test appropriate rather than an assembly test. llvm-svn: 178606 +static bool shouldUseLeafFramePointer(const ArgList &Args, + const llvm::Triple &Triple) { + if (Arg *A = Args.getLastArg(options::OPT_mno_omit_leaf_frame_pointer, + options::OPT_momit_leaf_frame_pointer)) + return A->getOption().matches(options::OPT_mno_omit_leaf_frame_pointer); + + // Don't use a leaf frame pointer on linux x86 and x86_64 if optimizing. + if ((Triple.getArch() == llvm::Triple::x86_64 || + Triple.getArch() == llvm::Triple::x86) && + Triple.getOS() == llvm::Triple::Linux) { + if (Arg *A = Args.getLastArg(options::OPT_O_Group)) + if (!A->getOption().matches(options::OPT_O0)) + return false; + } + + return true; +}