From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd35.google.com (mail-io1-xd35.google.com [IPv6:2607:f8b0:4864:20::d35]) by sourceware.org (Postfix) with ESMTPS id 38E82385E006 for ; Thu, 26 Mar 2020 18:08:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 38E82385E006 Received: by mail-io1-xd35.google.com with SMTP id o127so7092307iof.0 for ; Thu, 26 Mar 2020 11:08:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1yxdo5vtcDdl10gqRj2kFQoPeHbIscE9MN/EsmURrsY=; b=KTf0LGbM1YZRWYKQk1Og2Mw7ZM6j5r4gtc34ggpFNLHAh+5lBilvoX8HyeodunYcOr 2hhBfpXUe9lZ9C47kSk+ndLdD8sWlACB3Oi6owrx4KrYfk/8Dxp2DJaeo1ioc08vGRax 6DDXGpvSmm2JeC5acZu9Tdfx2Mn7UU4lYAE4sSjwyIojH9Nrk6RDXI8We46HIUw34koB agOqqccLEvFlcEpB2e5RZJ2UFnjlnyCu2NoZuADaUh1HZHdQLDD9P6MxOHe6WfIBgZ1g BjR2N3OtB7XmTxl6+afTBCQjQ97bqRv9nhSvCrBc1O2D53xnE1XUeP41q8s2jnvI58QP iTKg== X-Gm-Message-State: ANhLgQ1RCTlCKEYUe54tKfhMMqjWQaNsHyRW+nsTS5OI3NWpwzKP6VrT XnSAlnpq/LOMd9wfHhNba6DLW2uxVILh62hTGzE= X-Google-Smtp-Source: ADFU+vu7yJ5aH1QRCKxGS3qzOrmURVB59SbUEK1bP1xtdrpz1YcmbDN1prL76onnqeQ4Iwp0E1uKVXgkC8t3YuTUjgo= X-Received: by 2002:a02:6241:: with SMTP id d62mr8952200jac.86.1585246089728; Thu, 26 Mar 2020 11:08:09 -0700 (PDT) MIME-Version: 1.0 References: <0b2ec839-cf69-6b65-e317-a60aab24114f@arm.com> In-Reply-To: <0b2ec839-cf69-6b65-e317-a60aab24114f@arm.com> From: bitmap kid Date: Thu, 26 Mar 2020 19:07:58 +0100 Message-ID: Subject: Re: Newlib-3.3.0 build failed with gcc-9.3.0 armv6-m To: "Richard Earnshaw (lists)" Cc: newlib@sourceware.org, eblot.ml@gmail.com X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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: Thu, 26 Mar 2020 18:08:11 -0000 Thank you both for the advice and details. Laboriously, I arrived at a solution which suits me. Precede the call to ./configure by setting the flag CFLAGS_FOR_TARGET with the following values= : CFLAGS_FOR_TARGET=3D'- mcpu=3Darm7tdmi -marm -mlittle-endian -mfloat-abi=3D= soft -O0' ../newlib-3.3.0/configure --prefix =3D ... etc. That does the job. Thank you again. Le mer. 25 mars 2020 =C3=A0 19:02, Richard Earnshaw (lists) < Richard.Earnshaw@arm.com> a =C3=A9crit : > 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/ -isyst= em > > > /home/th/Downloads/newlib-3.3.0-build/arm-unknown-eabi/newlib/targ-includ= e > > -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/libnosy= s > > -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=3D/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=3Darm-unknown-eabi > > > > I I will not hide from you that I have not checked if this version of g= cc > > 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. >