From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2911 invoked by alias); 28 Jan 2014 16:56:59 -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 2900 invoked by uid 89); 28 Jan 2014 16:56:58 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=4.1 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,SPF_SOFTFAIL,T_FRT_BELOW2,URI_HEX autolearn=no version=3.3.2 X-HELO: sam.nabble.com Received: from sam.nabble.com (HELO sam.nabble.com) (216.139.236.26) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Tue, 28 Jan 2014 16:56:57 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1W8By2-0007Jd-SM for gcc-help@gcc.gnu.org; Tue, 28 Jan 2014 08:56:54 -0800 Date: Tue, 28 Jan 2014 16:56:00 -0000 From: knauf To: gcc-help@gcc.gnu.org Message-ID: <1390928214855-1006486.post@n5.nabble.com> Subject: Linking error: "*Output file* uses VFP register arguments, *library *does not"(cross compiler for ARM, Cortex-M3) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2014-01/txt/msg00111.txt.bz2 Hello, I have build myself a gcc cross compiler with all the necessary tools (naturally with 'binutils' and 'newlib') . During the linking process I have "*Output file* uses VFP register arguments, *library *does not" type error. During my searches for a solution I've noticed that this kind of error happened to everyone trying to use the hard FPU unit for computations. But this is not my case. I'm trying to create a code for the Cortex-M3 MCU, without any use of hard FPU unit. During compilation and linking process I was constantly passing '-mcpu=cortex-m3', '-mthumb' and '-mfloat-abi=soft' without any success. From a discussion here it seems that this is a multilib issue. Using appropriate compiling options I found that by default there are two libraries: "thumb" and "fpu". So this should be the case - gcc constantly uses "fpu" library despite my every effort to stop its use. Am I right? And if I'm right, what should I do? What kind of options should I pass to the compiler/linker? Bellow is the list of compiling and linking options: CFLAGS= -Wall -Wextra -Wimplicit-function-declaration \ -Wredundant-decls -Wstrict-prototypes -Wundef -Wshadow -g \ -fno-common -mcpu=cortex-m3 -mthumb -mfloat-abi=soft \ -MD LDFLAGS=--static -lc -lnosys -T tut.ld -nostartfiles -Wl,--gc-sections \ -lm -mcpu=cortex-m3 -mthumb -mfloat-abi=soft \ -Wl,-Map=tut.map -- View this message in context: http://gcc.1065356.n5.nabble.com/Linking-error-Output-file-uses-VFP-register-arguments-library-does-not-cross-compiler-for-ARM-Cortex-tp1006486.html Sent from the gcc - Help mailing list archive at Nabble.com.