https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66011
Bug ID: 66011 Summary: call to '__open_missing_mode' declared with attribute error Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: asolokha at gmx dot com Target Milestone: --- gcc-6.0.0_alpha20150503 fails to build for powerpc-e500v2-linux-gnuspe target inside libstdc++: --------8<-------- libtool: compile: powerpc-e500v2-linux-gnuspe-c++ -I/usr/powerpc-e500v2-linux-gnuspe/tmp/portage/sys-devel/gcc-6.0.0_alpha20150503/work/gcc-6-20150503/libstdc++-v3/../libgcc -I/usr/powerpc-e500v2-linux-gnuspe/tmp/portage/sys-devel/gcc-6.0.0_alpha20150503/work/build/powerpc-e500v2-linux-gnuspe/libstdc++-v3/include/powerpc-e500v2-linux-gnuspe -I/usr/powerpc-e500v2-linux-gnuspe/tmp/portage/sys-devel/gcc-6.0.0_alpha20150503/work/build/powerpc-e500v2-linux-gnuspe/libstdc++-v3/include -I/usr/powerpc-e500v2-linux-gnuspe/tmp/portage/sys-devel/gcc-6.0.0_alpha20150503/work/gcc-6-20150503/libstdc++-v3/libsupc++ -D_GLIBCXX_SHARED -std=gnu++14 -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -frandom-seed=ops.lo -g -O2 -pipe -D_GNU_SOURCE -c /usr/powerpc-e500v2-linux-gnuspe/tmp/portage/sys-devel/gcc-6.0.0_alpha20150503/work/gcc-6-20150503/libstdc++-v3/src/filesystem/ops.cc -fPIC -DPIC -D_GLIBCXX_SHARED -o ops.o In file included from /usr/powerpc-e500v2-linux-gnuspe/usr/include/fcntl.h:302:0, from /usr/powerpc-e500v2-linux-gnuspe/tmp/portage/sys-devel/gcc-6.0.0_alpha20150503/work/gcc-6-20150503/libstdc++-v3/src/filesystem/ops.cc:39: In function 'int open(const char*, int, ...)', inlined from 'bool {anonymous}::do_copy_file(const std::experimental::filesystem::v1::__cxx11::path&, const std::experimental::filesystem::v1::__cxx11::path&, std::experimental::filesystem::v1::copy_options, stat*, stat*, std::error_code&)' at /usr/powerpc-e500v2-linux-gnuspe/tmp/portage/sys-devel/gcc-6.0.0_alpha20150503/work/gcc-6-20150503/libstdc++-v3/src/filesystem/ops.cc:285:27: /usr/powerpc-e500v2-linux-gnuspe/usr/include/bits/fcntl2.h:50:26: error: call to '__open_missing_mode' declared with attribute error: open with O_CREAT in second argument needs 3 arguments __open_missing_mode (); ^ Makefile:481: recipe for target 'ops.lo' failed make[5]: *** [ops.lo] Error 1 -------->8-------- As man open says, > mode specifies the permissions to use in case a new file is created. > This argument must be supplied when O_CREAT or O_TMPFILE is specified > in flags; if neither O_CREAT nor O_TMPFILE is specified, then mode > is ignored. (and the similar wording can be found in Posix version). Cross-compiler is 5.1.0. I can provide full build log if necessary.