New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation for ESP32 on XTENSA architecture #1598

Closed
nkolban opened this Issue Jun 20, 2017 · 7 comments

Comments

Projects
None yet
3 participants
@nkolban

nkolban commented Jun 20, 2017

In the current build environment for libcurl, we find the file called:

curl/include/curl/system.h

contains environmental definitions. In my environment, I wish to build on the ESP32 MCU which uses the XTENSA chip set/architecture. GCC on this environment supplies the pre-defined macro called __XTENSA__. This issue requests a change of the source in system.h from this:

#elif defined(__GNUC__)
#  if !defined(__LP64__) && (defined(__ILP32__) || \
      defined(__i386__) || defined(__ppc__) || defined(__arm__) || \
      defined(__sparc__) || defined(__mips__) || defined(__sh__))

and change to:

#elif defined(__GNUC__)
#  if !defined(__LP64__) && (defined(__ILP32__) || \
      defined(__i386__) || defined(__ppc__) || defined(__arm__) || \
      defined(__sparc__) || defined(__mips__) || defined(__sh__) || defined(__XTENSA__))
@jay

This comment has been minimized.

Member

jay commented Jun 21, 2017

does it build ok with that change, are the type sizes in that section correct for your platform?

@bagder

This comment has been minimized.

Member

bagder commented Jun 24, 2017

fixed in ceff21a

@bagder bagder closed this Jun 24, 2017

@jay

This comment has been minimized.

Member

jay commented Jun 25, 2017

I'd still like to know if this was actually tested on that platform. That section assumes sizeof long is 4 which may not be right

@nkolban

This comment has been minimized.

nkolban commented Jun 25, 2017

I had a number of ESP32 users test the suggested change and so far so good. See:

nkolban/esp32-snippets#18

@jay

This comment has been minimized.

Member

jay commented Jun 25, 2017

ok. on your platform is sizeof(long) 4 or 8

@nkolban

This comment has been minimized.

nkolban commented Jun 25, 2017

On the ESP32 device, sizeof(long) evaluates to 4 bytes.

@jay

This comment has been minimized.

Member

jay commented Jun 26, 2017

ok. thanks for clearing that up

@lock lock bot locked as resolved and limited conversation to collaborators May 6, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.