Package Details: mips-elf-gcc 15.1.0-1

Git Clone URL: https://aur.archlinux.org/mips-elf-gcc.git (read-only, click to copy)
Package Base: mips-elf-gcc
Description: The GNU Compiler Collection - cross compiler for MIPS ELF (bare-metal) target
Upstream URL: https://gcc.gnu.org/
Licenses: GPL
Conflicts: cross-mips-elf-gcc
Replaces: cross-mips-elf-gcc
Submitter: angelodalzotto
Maintainer: giumacedo
Last Packager: giumacedo
Votes: 4
Popularity: 0.000000
First Submitted: 2022-03-14 00:26 (UTC)
Last Updated: 2025-05-30 16:33 (UTC)

Latest Comments

1 2 Next › Last »

TheRealOne78 commented on 2025-10-12 16:32 (UTC) (edited on 2025-10-12 16:33 (UTC) by TheRealOne78)

Hi. My build fails with the following message:

g++  -I../.././libcpp -I. -I../.././libcpp/../include -I../.././libcpp/include  -march=native -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS   -W -Wall -Wno-narrowing -Wwrite-strings -Wmissing-format-attribute -pedantic -Wno-long-long  -fno-exceptions -fno-rtti -I../.././libcpp -I. -I../.././libcpp/../include -I../.././libcpp/include    -c -o expr.o -MT expr.o -MMD -MP -MF .deps/expr.Tpo ../.././libcpp/expr.cc
../.././libcpp/expr.cc: In function ‘unsigned int cpp_classify_number(cpp_reader*, const cpp_token*, const char**, location_t)’:
../.././libcpp/expr.cc:882:35: error: format not a string literal and no format arguments [-Werror=format-security]
  882 |             cpp_warning_with_line (pfile, CPP_W_LONG_LONG, virtual_location,
      |             ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  883 |                                    0, message);
      |                                    ~~~~~~~~~~~
../.././libcpp/expr.cc:885:38: error: format not a string literal and no format arguments [-Werror=format-security]
  885 |             cpp_pedwarning_with_line (pfile, CPP_W_LONG_LONG,
      |             ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
  886 |                                       virtual_location, 0, message);
      |                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../.././libcpp/expr.cc:896:33: error: format not a string literal and no format arguments [-Werror=format-security]
  896 |           cpp_warning_with_line (pfile, CPP_W_SIZE_T_LITERALS,
      |           ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  897 |                                  virtual_location, 0, message);
      |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../.././libcpp/expr.cc:908:42: error: format not a string literal and no format arguments [-Werror=format-security]
  908 |                 cpp_pedwarning_with_line (pfile, CPP_W_C11_C23_COMPAT,
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  909 |                                           virtual_location, 0, message);
      |                                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../.././libcpp/expr.cc:911:39: error: format not a string literal and no format arguments [-Werror=format-security]
  911 |                 cpp_warning_with_line (pfile, CPP_W_C11_C23_COMPAT,
      |                 ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  912 |                                        virtual_location, 0, message);
      |                                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../.././libcpp/expr.cc:918:40: error: format not a string literal and no format arguments [-Werror=format-security]
  918 |               cpp_pedwarning_with_line (pfile, CPP_W_PEDANTIC,
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
  919 |                                         virtual_location, 0, message);
      |                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

giumacedo commented on 2025-07-30 12:15 (UTC)

@HurricanePootis T'sup, try gpg --recv-key 6C35B99309B5FA62

HurricanePootis commented on 2025-07-30 01:28 (UTC)

Hello, the pgp check fails

angelodalzotto commented on 2023-01-25 11:23 (UTC)

To use stdio.h (and other libraries) you may compile a standard C library, such as newlib.

dhims commented on 2023-01-25 07:19 (UTC)

After installation of package I am not able to build c code as it cannot find stdio.h. Any idea how to fix it? "fatal error: stdio.h: No such file or directory"

mthfrr commented on 2021-12-26 10:49 (UTC)

I had a similar problem as philpirj. The -Werror=format-security flag came from the config of makepkg (/etc/makepkg.conf).

I removed it and it works !

If someone cares, the CFLAGS set by default in makepkg.conf are:

CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions \
    -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security \
    -fstack-clash-protection -fcf-protection"

This is a fresh arch install from the 2021.12 iso.

NigelCunningham commented on 2021-10-22 22:36 (UTC)

I have been able to reproduce the issue for the last few months.

What packages & configuration might influence the build to cause this?

angelodalzotto commented on 2021-07-12 10:55 (UTC)

I can't reproduce the build error as its building just fine for me without applying any patches.

About the signature, you may import the key:

gpg --recv-keys 6C35B99309B5FA62

philpirj commented on 2021-06-27 14:01 (UTC)

Alright, there's https://github.com/archlinux/svntogit-packages/blob/packages/gcc/trunk/gcc11-Wno-format-security.patch in the core gcc package.

It should be applied as well to cross-mips-elf-gcc like this (see https://github.com/archlinux/svntogit-packages/blob/c0c9a945c11d1868af6d4dbcef985319ee153ea3/trunk/PKGBUILD#L31):

source=(https://sourceware.org/pub/gcc/releases/gcc-${pkgver}/gcc-${pkgver}.tar.xz{,.sig}
        gcc11-Wno-format-security.patch
)

Also, add:

  # configure.ac: When adding -Wno-format, also add -Wno-format-security
  patch -Np0 < "$srcdir/gcc11-Wno-format-security.patch"

to prepare().

It is, however, still insufficient, as the error is detected in libcpp, while we've patched the root configure.ac.

What helps is the removal of:

enable_werror_always

from src/gcc-11.1.0/libcpp/configure. However, I don't really understand what from src/gcc-11.1.0/libcpp/configure.ac adds it, and can't create an includable patch.

After removing this nasty option, I could manually build GCC. Next:

src/gcc-11.1.0 $ make DESTDIR=/home/pirj/source/tmp/cross-mips-elf-gcc/pkg install-gcc
$ cd ../..
$ makepkg --repackage

failed with:

find: ‘/home/pirj/source/tmp/cross-mips-elf-gcc/pkg/cross-mips-elf-gcc/usr/bin/’: No such file or directory

as it creates usr/local/bin, not usr/bin:

$ ls pkg/cross-mips-elf-gcc/usr/local/
bin/      include/  lib/      libexec/  share/

philpirj commented on 2021-06-09 08:46 (UTC)

Getting a compilation error now:

make[1]: Entering directory '/home/pirj/source/tmp/cross-mips-elf-gcc/src/gcc-11.1.0/build-x86_64-pc-linux-gnu/libcpp'
test -f config.h || (rm -f stamp-h1 && make stamp-h1)
g++  -I../.././libcpp -I. -I../.././libcpp/../include -I../.././libcpp/include  -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2,-D_GLIBCXX_ASSERTIONS         -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -W -Wall -Wno-narrowing -Wwrite-strings -Wmissing-format-attribute -pedantic -Wno-long-long  -fno-exceptions -fno-rtti -I../.././libcpp -I. -I../.././libcpp/../include -I../.././libcpp/include    -c -o expr.o -MT expr.o -MMD -MP -MF .deps/expr.Tpo ../.././libcpp/expr.c
../.././libcpp/expr.c: In function ‘unsigned int cpp_classify_number(cpp_reader*, const cpp_token*, const char**, location_t)’:
../.././libcpp/expr.c:811:35: error: format not a string literal and no format arguments [-Werror=format-security]
  811 |             cpp_warning_with_line (pfile, CPP_W_LONG_LONG, virtual_location,
      |             ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  812 |                                    0, message);
      |                                    ~~~~~~~~~~~
../.././libcpp/expr.c:814:38: error: format not a string literal and no format arguments [-Werror=format-security]
  814 |             cpp_pedwarning_with_line (pfile, CPP_W_LONG_LONG,
      |             ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
  815 |                                       virtual_location, 0, message);
      |                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../.././libcpp/expr.c:824:33: error: format not a string literal and no format arguments [-Werror=format-security]
  824 |           cpp_warning_with_line (pfile, CPP_W_SIZE_T_LITERALS,
      |           ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  825 |                                  virtual_location, 0, message);
      |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: some warnings being treated as errors
make[1]: *** [Makefile:226: expr.o] Error 1
make[1]: Leaving directory '/home/pirj/source/tmp/cross-mips-elf-gcc/src/gcc-11.1.0/build-x86_64-pc-linux-gnu/libcpp'