[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #58575] compilation error on ARMCC6
From: |
Adib |
Subject: |
[lwip-devel] [bug #58575] compilation error on ARMCC6 |
Date: |
Mon, 15 Jun 2020 09:21:32 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0 |
URL:
<https://savannah.nongnu.org/bugs/?58575>
Summary: compilation error on ARMCC6
Project: lwIP - A Lightweight TCP/IP stack
Submitted by: taraben_a
Submitted on: Mon 15 Jun 2020 01:21:30 PM UTC
Category: Platform ports
Severity: 3 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Planned Release: None
lwIP version: git head
_______________________________________________________
Details:
Hello all,
I am using STM32 on win32 and Keil-MDK and auto generated project using
CubeMX.
This comes with lwip 2.1.2
Using the compiler version 6 ARM-CC 6.1.4 clang based compiler, I run into
compiler problem.
../Middlewares/Third_Party/LwIP/system\arch/cc.h(46): error: 'sys/time.h' file
not found
#include <sys/time.h>
^~~~~~~~~~~~
in file cc.h line 44ff
...
>#if defined (__GNUC__) & !defined (__CC_ARM)
>
>#define LWIP_TIMEVAL_PRIVATE 0
>#include <sys/time.h>
>
>#endif
...
The test for compiler is not correct (i assume).
There are other tests in cmsis_compiler.h 33ff
...
>/*
> * Arm Compiler 4/5
> */
>#if defined ( __CC_ARM )
> #include "cmsis_armcc.h"
>
>
>/*
> * Arm Compiler 6 (armclang)
> */
>#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
> #include "cmsis_armclang.h"
>
>
>/*
> * GNU Compiler
> */
>#elif defined ( __GNUC__ )
> #include "cmsis_gcc.h"
...
I can resolve this error using following patch which applies the test logic of
cmsis_compiler.h on that in cc.h
Index: cc.h
===================================================================
--- cc.h (revision 18447)
+++ cc.h (working copy)
@@ -40,7 +40,7 @@
#define LWIP_PROVIDE_ERRNO
-#if defined (__GNUC__) & !defined (__CC_ARM)
+#if defined (__GNUC__) && !defined (__CC_ARM) && !(defined(__ARMCC_VERSION)
&& (__ARMCC_VERSION >= 6010050))
#define LWIP_TIMEVAL_PRIVATE 0
#include <sys/time.h>
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Mon 15 Jun 2020 01:21:30 PM UTC Name: cc.h.patch Size: 716B By:
taraben_a
patch that fixes the compiler problem
<http://savannah.nongnu.org/bugs/download.php?file_id=49273>
_______________________________________________________
Reply to this item at:
<https://savannah.nongnu.org/bugs/?58575>
_______________________________________________
Message sent via Savannah
https://savannah.nongnu.org/
- [lwip-devel] [bug #58575] compilation error on ARMCC6,
Adib <=