From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32911 invoked by alias); 22 Feb 2018 15:37:02 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 32789 invoked by uid 89); 22 Feb 2018 15:37:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.5 required=5.0 tests=BAYES_05,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=H*x:10.0, egg, Hx-spam-relays-external:74.6.129.123, H*RU:74.6.129.123 X-HELO: sonic309-13.consmr.mail.bf2.yahoo.com Received: from sonic309-13.consmr.mail.bf2.yahoo.com (HELO sonic309-13.consmr.mail.bf2.yahoo.com) (74.6.129.123) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 22 Feb 2018 15:36:59 +0000 Received: from sonic.gate.mail.ne1.yahoo.com by sonic309.consmr.mail.bf2.yahoo.com with HTTP; Thu, 22 Feb 2018 15:36:58 +0000 Date: Thu, 22 Feb 2018 15:55:00 -0000 From: "Paul Gelencser via gcc-help" Reply-To: Paul Gelencser Reply-To: Paul Gelencser To: Message-ID: <1530379179.3822323.1519313817555@mail.yahoo.com> Subject: configuring reentrant syscalls to compile ARM processor programs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit References: <1530379179.3822323.1519313817555.ref@mail.yahoo.com> X-SW-Source: 2018-02/txt/msg00126.txt.bz2 Hello, Thank you for offering help through this mailing list. I'm having some trouble compiling, and was hoping for some guidance. I'm aware of two paths I could take (maybe there are more), but am not sure what path makes sense. Help is appreciated. My application is to compile ARM program files into .elf files to run in a test environment, if that helps. The errors are of the type: /lib\libc.a(lib_a-exit.o): In function `exit': exit.c:(.text.exit+0x2c): undefined reference to `_exit' /lib/crt0.o: In function `_start': (.text+0xec): undefined reference to `main' /lib\libc.a(lib_a-sbrkr.o): In function `_sbrk_r': sbrkr.c:(.text._sbrk_r+0x18): undefined reference to `_sbrk' /lib\libc.a(lib_a-isattyr.o): In function `_isatty_r': isattyr.c:(.text._isatty_r+0x18): undefined reference to `_isatty' >From the error message, one solution I could pursue would be to define two macros, REENTRANT_SYSCALLS_PROVIDED MISSING_SYSCALL_NAMES, which are used in file, ..."7 2017-q4-major\arm-none-eabi\include\reent.h". There are proper instructions in file "reent.h" for enabling syscalls, but they refer to a file I can't find, "configure.host". Also, I'm not sure if defining these macros would lead to hitting other errors. The other path which someone suggested was to assert "-nostdlib -nostartfiles -ffreestanding", but then I believe I'm on the hook for finding all of the mandatory dependencies of the compiler, which could be a long list of things to find - kind of an Easter egg hunt. Help is greatly appreciated. Thanks, Paul