From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id 38AE0385E00D for ; Wed, 25 Mar 2020 18:02:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 38AE0385E00D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=Richard.Earnshaw@arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id CFE0D30E; Wed, 25 Mar 2020 11:02:48 -0700 (PDT) Received: from e120077-lin.cambridge.arm.com (e120077-lin.cambridge.arm.com [10.2.78.81]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 5CF803F52E; Wed, 25 Mar 2020 11:02:48 -0700 (PDT) Subject: Re: Newlib-3.3.0 build failed with gcc-9.3.0 armv6-m To: bitmap kid , newlib@sourceware.org References: From: "Richard Earnshaw (lists)" Message-ID: <0b2ec839-cf69-6b65-e317-a60aab24114f@arm.com> Date: Wed, 25 Mar 2020 18:02:47 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-15.8 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2020 18:02:50 -0000 On 21/03/2020 17:45, bitmap kid via Newlib wrote: > Hello, > > When I compile newlib with a gcc-9.3.0, i get the following error : > > arm-unknown-eabi-gcc > -B/home/th/Downloads/newlib-3.3.0-build/arm-unknown-eabi/newlib/ -isystem > /home/th/Downloads/newlib-3.3.0-build/arm-unknown-eabi/newlib/targ-include > -isystem /home/th/Downloads/newlib-3.3.0/newlib/libc/include > -B/home/th/Downloads/newlib-3.3.0-build/arm-unknown-eabi/libgloss/arm > -L/home/th/Downloads/newlib-3.3.0-build/arm-unknown-eabi/libgloss/libnosys > -L/home/th/Downloads/newlib-3.3.0/libgloss/arm -g -O2 -I. > -I../../../../newlib-3.3.0/libgloss/arm/.. `if [ -d ./../../newlib ]; then > echo -I../../../../newlib-3.3.0/libgloss/arm/../../newlib/libc/machine/arm; > fi` -g -O2 -c ../../../../newlib-3.3.0/libgloss/arm/linux-syscalls0.S > ../../../../newlib-3.3.0/libgloss/arm/linux-syscalls0.S: Assembler messages: > ../../../../newlib-3.3.0/libgloss/arm/linux-syscalls0.S:44: Error: SVC is > not permitted on this architecture > ../../../../newlib-3.3.0/libgloss/arm/linux-syscalls0.S:45: Error: SVC is > not permitted on this architecture > ../../../../newlib-3.3.0/libgloss/arm/linux-syscalls0.S:46: Error: SVC is > not permitted on this architecture > [...] > ../../../../newlib-3.3.0/libgloss/arm/linux-syscalls0.S:102: Error: SVC is > not permitted on this architecture > ../../../../newlib-3.3.0/libgloss/arm/linux-syscalls0.S:103: Error: SVC is > not permitted on this architecture > make[3]: *** [Makefile:126 : linux-syscalls0.o] Erreur 1 > > Not really surprising, because this GCC is armv6-m default arch, an > unavailable coprocessor instructions cpu. > > Am I at an impasse ? > > Below, the newlib configure command : > > ../newlib-3.3.0/configure --prefix=/home/th/armv4vm-cc/ > --disable-interwork --disable-newlib-supplied-syscalls --with-gnu-ld > --with-gnu-as --disable-shared --disable-nls --enable-newlib-io-long-long > --enable-newlib-io-long-double --enable-newlib-io-c99-formats > --target=arm-unknown-eabi > > I I will not hide from you that I have not checked if this version of gcc > is compatible with this one from newlib :( > > I thank you so much to help me to find a work around. > > thierry > SVC is supported by armv6s-m, which is a minor variant of the architecture. You can use that if you want. TLDR: the only difference between armv6-m and armv6s-m is how the SVC opcode is handled by the hardware. In armv6s-m there is a specific exception mode to handle it. In armv6-m this exception mode is lacking and the instruction will take the undefined instruction exception (which can then emulate the instruction if it so desires). Either can therefore support SVC and the only difference is for 'kernel' code that has to understand the different behaviours. There's a small performance cost as well, of course, because the instruction has to be decoded first if going via the undef instruction trap. R.