public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: R0b0t1 <r030t1@gmail.com>
To: GCC Development <gcc@gcc.gnu.org>
Subject: Error In libssp, But Disabled in Configuration
Date: Sun, 18 Feb 2018 07:42:00 -0000	[thread overview]
Message-ID: <CAAD4mYiPLJgN98D3RwScVbDPc8hgXOkHekHz4pOFgq8jOOFtHQ@mail.gmail.com> (raw)

Taking inspiration from
https://github.com/FreddieChopin/bleeding-edge-toolchain, I have a
script which runs:

    ../../source/${dname}/configure \
        --target=${TARGET} \
        --enable-languages=c \
        --without-headers \
        --prefix=`realpath ../../${DIR_PREFIX}` \
        --libexecdir=`realpath ../../${DIR_PREFIX}/lib`
        --disable-decimal-float \
        --disable-libffi \
        --disable-libgomp \
        --disable-libmudflap \
        --disable-libquadmath \
        --disable-libssp \
        --disable-libstdcxx-pch \
        --disable-nls \
        --disable-shared \
        --disable-threads \
        --disable-tls \
        --with-newlib \
        --with-gnu-as \
        --with-gnu-ld \
        --with-sysroot=`realpath ../../${DIR_PREFIX}/${TARGET}` \
        --with-system-zlib \
        --with-gmp=`realpath ../../${DIR_PREFIX}/host/${gmp_dname}` \
        --with-mpfr=`realpath ../../${DIR_PREFIX}/host/${mpfr_dname}` \
        --with-mpc=`realpath ../../${DIR_PREFIX}/host/${mpc_dname}` \
        --with-isl=`realpath ../../${DIR_PREFIX}/host/${isl_dname}` \
        --with-pkgversion=${VERSION}

(libssp is disabled as it is provided by newlib.) When compiling GCC,
an attempt to build libssp is made, and this fails with the following:

../../../../source/gcc-7.3.0/libssp/ssp.c: In function ‘__guard_setup’:
../../../../source/gcc-7.3.0/libssp/ssp.c:93:12: warning: implicit
declaration of function ‘open’ [-Wimplicit-function-declaration]
   int fd = open ("/dev/urandom", O_RDONLY);
            ^~~~
../../../../source/gcc-7.3.0/libssp/ssp.c:93:34: error: ‘O_RDONLY’
undeclared (first use in this function)
   int fd = open ("/dev/urandom", O_RDONLY);
                                  ^~~~~~~~
../../../../source/gcc-7.3.0/libssp/ssp.c:93:34: note: each undeclared
identifier is reported only once for each function it appears in
../../../../source/gcc-7.3.0/libssp/ssp.c:96:7: error: unknown type
name ‘ssize_t’
       ssize_t size = read (fd, &__stack_chk_guard,
       ^~~~~~~
../../../../source/gcc-7.3.0/libssp/ssp.c:96:22: warning: implicit
declaration of function ‘read’ [-Wimplicit-function-declaration]
       ssize_t size = read (fd, &__stack_chk_guard,
                      ^~~~
../../../../source/gcc-7.3.0/libssp/ssp.c:98:7: warning: implicit
declaration of function ‘close’ [-Wimplicit-function-declaration]
       close (fd);
       ^~~~~
../../../../source/gcc-7.3.0/libssp/ssp.c: At top level:
../../../../source/gcc-7.3.0/libssp/ssp.c:113:25: error: unknown type
name ‘size_t’
 fail (const char *msg1, size_t msg1len, const char *msg3)
                         ^~~~~~
../../../../source/gcc-7.3.0/libssp/ssp.c: In function ‘__stack_chk_fail’:
../../../../source/gcc-7.3.0/libssp/ssp.c:185:3: warning: implicit
declaration of function ‘fail’ [-Wimplicit-function-declaration]
   fail (msg, strlen (msg), "stack smashing detected: terminated");
   ^~~~
../../../../source/gcc-7.3.0/libssp/ssp.c:185:14: warning: implicit
declaration of function ‘strlen’ [-Wimplicit-function-declaration]
   fail (msg, strlen (msg), "stack smashing detected: terminated");
              ^~~~~~
../../../../source/gcc-7.3.0/libssp/ssp.c:185:14: warning:
incompatible implicit declaration of built-in function ‘strlen’
../../../../source/gcc-7.3.0/libssp/ssp.c:185:14: note: include
‘<string.h>’ or provide a declaration of ‘strlen’
../../../../source/gcc-7.3.0/libssp/ssp.c: In function ‘__chk_fail’:
../../../../source/gcc-7.3.0/libssp/ssp.c:192:14: warning:
incompatible implicit declaration of built-in function ‘strlen’
   fail (msg, strlen (msg), "buffer overflow detected: terminated");
              ^~~~~~
../../../../source/gcc-7.3.0/libssp/ssp.c:192:14: note: include
‘<string.h>’ or provide a declaration of ‘strlen’
make[2]: *** [Makefile:487: ssp.lo] Error 1


I've attempted to search for a solution, but they were all more or
less "disable libssp."

Thanks in advance,
     R0b0t1

             reply	other threads:[~2018-02-18  7:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-18  7:42 R0b0t1 [this message]
2018-02-19  9:22 ` R0b0t1

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAAD4mYiPLJgN98D3RwScVbDPc8hgXOkHekHz4pOFgq8jOOFtHQ@mail.gmail.com \
    --to=r030t1@gmail.com \
    --cc=gcc@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).