Skip to content
This repository was archived by the owner on Aug 5, 2022. It is now read-only.

Conversation

@krocard
Copy link
Contributor

@krocard krocard commented Jun 5, 2015

In order to build the parameter-framework on darwin (osx), clang must be supported.

  • Fix the code to compile with clang
  • Enable travis's clang build
  • No longer forbid to build with clang in android.mk

Notes

  • the parameter framework still does not support out of the box compilation on darwin due to warnings (deprecated features mostly) that are considered as errors.
  • the first patch removed the fake parameter-framework_include lib that was used by the plugins to find PFw headers. This mean that all plugin makefiles must be updated.

@krocard krocard added this to the Version 2.6.0 milestone Jun 5, 2015
The code was using a hack to export headers only through a empty lib. This
trick does not work on darwin hosts.

This patch remove this hack and use the standard export C include dir.

Change-Id: I34a69a6f66479b3a499efc4a648c43f022e1c472
Signed-off-by: Sebastien Gonzalve <sebastien.gonzalve@intel.com>
Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
@krocard krocard force-pushed the android-darwin-clang branch from 7bcb05f to 378169d Compare June 5, 2015 10:03
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this line shouldn't be removed.

@krocard krocard force-pushed the android-darwin-clang branch 2 times, most recently from c3f098f to ed21dc1 Compare June 5, 2015 15:50
@coveralls
Copy link

Coverage Status

Coverage increased (+0.16%) to 70.32% when pulling ed21dc1 on krocard:android-darwin-clang into 7ba789f on 01org:master.

@krocard krocard force-pushed the android-darwin-clang branch from ed21dc1 to a74e8f1 Compare June 8, 2015 09:20
@krocard krocard changed the title [WIP]Android darwin clang Build on darwin in the android framework with clang Jun 8, 2015
@krocard
Copy link
Contributor Author

krocard commented Jun 8, 2015

👍 @dawagner @OznOg Please review. These are essentially your patches a bit reworked (added comments) for some.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this variable should be LOCAL_LDFLAGS.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only differences between LDFLAGS and LDLIBS is there place in ld command line. As you can see in build/core/definitions.mk L1370 and L1380 LDFLAGS is added a the be beginning and LDLIBS is added at the end.
As python-config flags must have precedence, add them at the end.

Sebastien Gonzalve and others added 11 commits June 8, 2015 15:09
Pathes were hardcoded to linux which make compilation fail on MacOs.

This patch gets the correct host build arch to fix compilation under MacOSx.

Change-Id: Ie49d179cf1e7a54fa862f8b2f0996d7945884b96
Signed-off-by: Sebastien Gonzalve <sebastien.gonzalve@intel.com>
Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
Those signals are useless and causes problems on darwin (BSD) compilation.
Actually on recv, the flag is ignored on Linux, and on send, it should not be
necessary if we do not write on a closed socket.

Thus patch thus removes the flags and close the socket on error.

Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
The lib in prebuild/darwin-x86 is in fact a 64bit lib and link fails.

This patch make the host binary use the host python to link (this is quite
wrong as the version may not be compatible with the android swig version

Change-Id: Ic6ed36a498904e082c1c60f05cc54827ca6ea705
Signed-off-by: Sebastien Gonzalve <sebastien.gonzalve@intel.com>
Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
This flag is not understood by clang. Also, the currently generated code
doesn't seem to contain such error.

Change-Id: I386ab576e93003d69dcf2c593670245070770024
Signed-off-by: Jules Clero <julesx.clero@intel.com>
Signed-off-by: Sebastien Gonzalve <sebastien.gonzalve@intel.com>
Passing a reference as second argument of va_start() is undefined behaviour.
Instead, we should stick to printf's semantic.

Keep std::string in plugin api for retro compatibility but pass by value.

Change-Id: I3f3cba3c3c362bb5809003aab837579cd6c3b1de
Signed-off-by: Sebastien Gonzalve <sebastien.gonzalve@intel.com>
Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
accessAsInteger function prototype is defined in BaseParameter
abstract class with an uint32_t type. Nevertheless in BitParameter
the overloaded function take an uin64_t. It seems that GCC accepts
wrongly this mistake but clang don't.
This patch corrects the function prototype accordingly to the one
defined in BaseParameter. It allows the project to be compiled
with clang.

Change-Id: I36e9269313f34af870808b7140f0eab3cdfd9820
Signed-off-by: Jules Clero <julesx.clero@intel.com>
The element class really looks like a god class with stuff that has
really nothing to do with its role. toString and appendTitle are good
example of stuff that should be move away from it.

This patch move those two functions into utility where they seems to
belong.

Signed-off-by: Sébastien Gonzalve <oznog@users.noreply.github.com>
Signed-off-by: Jules Clero <julesx.clero@intel.com>
On target, linking against pthread is useless since it is included in bionic.

Change-Id: I4bf51d7ac02bbea7bf6fbbf6218d68ff351d22b9
Signed-off-by: David Wagner <david.wagner@intel.com>
Change-Id: Ic94bb62ecd7e7e0fadb067d8bda3febb700d5fc6
Signed-off-by: Sebastien Gonzalve <sebastien.gonzalve@intel.com>
Signed-off-by: David Wagner <david.wagner@intel.com>
Signed-off-by: David Brageul <david.brageul@intel.com>
Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
@krocard krocard force-pushed the android-darwin-clang branch from a74e8f1 to d4726be Compare June 8, 2015 13:22
krocard added a commit that referenced this pull request Jun 9, 2015
Build on darwin in the android framework with clang

In order to build the parameter-framework on darwin (osx), clang must be supported.
 - Fix the code to compile with clang
 - Enable travis's clang build
 - No longer forbid to build with clang in android.mk

Notes
 - the parameter framework still does not support out of the box
   compilation on darwin due to warnings (deprecated features mostly)
   that are considered as errors.
 - the first patch removed the fake parameter-framework_include lib
   that was used by the plugins to find PFw headers.
   This mean that all plugin makefiles must be updated.
@krocard krocard merged commit 83c2bab into intel:master Jun 9, 2015
@krocard krocard deleted the android-darwin-clang branch June 9, 2015 18:39
This was referenced Jun 11, 2015
This was referenced Jun 15, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants