diff mbox

[4/6] helper: select os in configure

Message ID 20161212145230.11412-5-mike.holmes@linaro.org
State New
Headers show

Commit Message

Mike Holmes Dec. 12, 2016, 2:52 p.m. UTC
Signed-off-by: Mike Holmes <mike.holmes@linaro.org>

---
 configure.ac       | 14 ++++++++++++++
 helper/Makefile.am |  2 +-
 2 files changed, 15 insertions(+), 1 deletion(-)

-- 
2.9.3

Comments

Christophe Milard Dec. 13, 2016, 7:46 a.m. UTC | #1
On 12 December 2016 at 15:52, Mike Holmes <mike.holmes@linaro.org> wrote:

> Signed-off-by: Mike Holmes <mike.holmes@linaro.org>

> ---

>  configure.ac       | 14 ++++++++++++++

>  helper/Makefile.am |  2 +-

>  2 files changed, 15 insertions(+), 1 deletion(-)

>

> diff --git a/configure.ac b/configure.ac

> index 20ec479..39c040d 100644

> --- a/configure.ac

> +++ b/configure.ac

> @@ -154,6 +154,19 @@ fi

>  ODP_CFLAGS="$ODP_CFLAGS -DIMPLEMENTATION_NAME=$IMPLEMENTATION_NAME"

>

>  ############################################################

> ##############

> +# Determine which os to build helpers for

> +###########################################################

> ###############

> +AC_ARG_WITH([os],

> +    [AS_HELP_STRING([--with-os=os],

> +       [select platform to be used, default linux])],

>


Shouldn't it be " select OS to be used, default linux" ???
Here again, we hit the platform vs OS question, but if the platform and OS
are different things, then it should be OS here! If there are the same
thing, then why not using the -with-platform which we already have...

I guess we know what an OS is... but what is a platform?
-The HW in which ODP is running (implies memory size limitation, different
pktio interfaces...). This is my understanding, but odp/pltaform/linux-gen
is missleading and should be called odp/os/linux-gen
- A couple HW/OS, as this patch seems to imply?

Christophe

+    [],
> +    [with_os=linux

> +    ])

> +

> +AC_SUBST([with_os])

> +

> +

> +###########################################################

> ###############

>  # Include m4 files

>  ############################################################

> ##############

>  m4_include([./doc/m4/configure.m4])

> @@ -323,6 +336,7 @@ AC_MSG_RESULT([

>         implementation_name:    ${IMPLEMENTATION_NAME}

>         ARCH_DIR                ${ARCH_DIR}

>         with_platform:          ${with_platform}

> +       with_os:                ${with_os}

>         prefix:                 ${prefix}

>         sysconfdir:             ${sysconfdir}

>         libdir:                 ${libdir}

> diff --git a/helper/Makefile.am b/helper/Makefile.am

> index 4e59850..3805c45 100644

> --- a/helper/Makefile.am

> +++ b/helper/Makefile.am

> @@ -35,7 +35,7 @@ __LIB__libodphelper_linux_la_SOURCES = \

>                                         eth.c \

>                                         ip.c \

>                                         chksum.c \

> -                                       os/linux/thread.c \

> +                                       os/@with_os@/thread.c \

>                                         hashtable.c \

>                                         lineartable.c

>

> --

> 2.9.3

>

>
Nicolas Morey-Chaisemartin Dec. 13, 2016, 8:01 a.m. UTC | #2
Le 12/13/2016 à 08:46 AM, Christophe Milard a écrit :
> On 12 December 2016 at 15:52, Mike Holmes <mike.holmes@linaro.org> wrote:

>

>> Signed-off-by: Mike Holmes <mike.holmes@linaro.org>

>> ---

>>  configure.ac       | 14 ++++++++++++++

>>  helper/Makefile.am |  2 +-

>>  2 files changed, 15 insertions(+), 1 deletion(-)

>>

>> diff --git a/configure.ac b/configure.ac

>> index 20ec479..39c040d 100644

>> --- a/configure.ac

>> +++ b/configure.ac

>> @@ -154,6 +154,19 @@ fi

>>  ODP_CFLAGS="$ODP_CFLAGS -DIMPLEMENTATION_NAME=$IMPLEMENTATION_NAME"

>>

>>  ############################################################

>> ##############

>> +# Determine which os to build helpers for

>> +###########################################################

>> ###############

>> +AC_ARG_WITH([os],

>> +    [AS_HELP_STRING([--with-os=os],

>> +       [select platform to be used, default linux])],

>>

> Shouldn't it be " select OS to be used, default linux" ???

> Here again, we hit the platform vs OS question, but if the platform and OS

> are different things, then it should be OS here! If there are the same

> thing, then why not using the -with-platform which we already have...

>

> I guess we know what an OS is... but what is a platform?

> -The HW in which ODP is running (implies memory size limitation, different

> pktio interfaces...). This is my understanding, but odp/pltaform/linux-gen

> is missleading and should be called odp/os/linux-gen

> - A couple HW/OS, as this patch seems to imply?

>

> Christophe

>

> +    [],

We have the case here at Kalray where we have a single platform (mppa) but 2 supported OS depending on what the user wants to do (non ODP compliant code).
The OS has no impact on the platform, but changes the helpers.

So no the platform isn't fully OS dependent.
And yes the help string should be "select OS to be used"

Nicolas
Christophe Milard Dec. 13, 2016, 8:54 a.m. UTC | #3
OK. this is somehow matching my understanding:
. OS= linux, BSD, windows, OSE or mppa
. Platform = HW board on which that stuff is run (implies different running
parametrs, such as pktio interface names, mem sizes...)

Not sure how to reflect that propåerly in the current structure, where
platform really means both things (sometimes OS, sometimes HW), but that is
the next step :-), if we at least can agree on the vocabulary...

I'd  like to see a way forward with a nice clean structure reflecting these
2 concepts, but hopefully this patchset is a step towards it. (at least, it
will show the problems that follows)

Chrstophe



On 13 December 2016 at 09:01, Nicolas Morey-Chaisemartin <nmorey@kalray.eu>
wrote:

>

>

> Le 12/13/2016 à 08:46 AM, Christophe Milard a écrit :

> > On 12 December 2016 at 15:52, Mike Holmes <mike.holmes@linaro.org>

> wrote:

> >

> >> Signed-off-by: Mike Holmes <mike.holmes@linaro.org>

> >> ---

> >>  configure.ac       | 14 ++++++++++++++

> >>  helper/Makefile.am |  2 +-

> >>  2 files changed, 15 insertions(+), 1 deletion(-)

> >>

> >> diff --git a/configure.ac b/configure.ac

> >> index 20ec479..39c040d 100644

> >> --- a/configure.ac

> >> +++ b/configure.ac

> >> @@ -154,6 +154,19 @@ fi

> >>  ODP_CFLAGS="$ODP_CFLAGS -DIMPLEMENTATION_NAME=$IMPLEMENTATION_NAME"

> >>

> >>  ############################################################

> >> ##############

> >> +# Determine which os to build helpers for

> >> +###########################################################

> >> ###############

> >> +AC_ARG_WITH([os],

> >> +    [AS_HELP_STRING([--with-os=os],

> >> +       [select platform to be used, default linux])],

> >>

> > Shouldn't it be " select OS to be used, default linux" ???

> > Here again, we hit the platform vs OS question, but if the platform and

> OS

> > are different things, then it should be OS here! If there are the same

> > thing, then why not using the -with-platform which we already have...

> >

> > I guess we know what an OS is... but what is a platform?

> > -The HW in which ODP is running (implies memory size limitation,

> different

> > pktio interfaces...). This is my understanding, but

> odp/pltaform/linux-gen

> > is missleading and should be called odp/os/linux-gen

> > - A couple HW/OS, as this patch seems to imply?

> >

> > Christophe

> >

> > +    [],

> We have the case here at Kalray where we have a single platform (mppa) but

> 2 supported OS depending on what the user wants to do (non ODP compliant

> code).

> The OS has no impact on the platform, but changes the helpers.

>

> So no the platform isn't fully OS dependent.

> And yes the help string should be "select OS to be used"

>

> Nicolas

>
Nicolas Morey-Chaisemartin Dec. 13, 2016, 9:22 a.m. UTC | #4
Le 12/13/2016 à 09:54 AM, Christophe Milard a écrit :
> OK. this is somehow matching my understanding:

> . OS= linux, BSD, windows, OSE or mppa

> . Platform = HW board on which that stuff is run (implies different running parametrs, such as pktio interface names, mem sizes...)

>

> Not sure how to reflect that propåerly in the current structure, where platform really means both things (sometimes OS, sometimes HW), but that is the next step :-), if we at least can agree on the vocabulary...

>

> I'd  like to see a way forward with a nice clean structure reflecting these 2 concepts, but hopefully this patchset is a step towards it. (at least, it will show the problems that follows)

>

> Chrstophe

>

mppa is not an OS but I agree ;)

Nicolas
>

>

> On 13 December 2016 at 09:01, Nicolas Morey-Chaisemartin <nmorey@kalray.eu <mailto:nmorey@kalray.eu>> wrote:

>

>

>

>     Le 12/13/2016 à 08:46 AM, Christophe Milard a écrit :

>     > On 12 December 2016 at 15:52, Mike Holmes <mike.holmes@linaro.org <mailto:mike.holmes@linaro.org>> wrote:

>     >

>     >> Signed-off-by: Mike Holmes <mike.holmes@linaro.org <mailto:mike.holmes@linaro.org>>

>     >> ---

>     >>  configure.ac <http://configure.ac>       | 14 ++++++++++++++

>     >>  helper/Makefile.am |  2 +-

>     >>  2 files changed, 15 insertions(+), 1 deletion(-)

>     >>

>     >> diff --git a/configure.ac <http://configure.ac> b/configure.ac <http://configure.ac>

>     >> index 20ec479..39c040d 100644

>     >> --- a/configure.ac <http://configure.ac>

>     >> +++ b/configure.ac <http://configure.ac>

>     >> @@ -154,6 +154,19 @@ fi

>     >>  ODP_CFLAGS="$ODP_CFLAGS -DIMPLEMENTATION_NAME=$IMPLEMENTATION_NAME"

>     >>

>     >>  ############################################################

>     >> ##############

>     >> +# Determine which os to build helpers for

>     >> +###########################################################

>     >> ###############

>     >> +AC_ARG_WITH([os],

>     >> +    [AS_HELP_STRING([--with-os=os],

>     >> +       [select platform to be used, default linux])],

>     >>

>     > Shouldn't it be " select OS to be used, default linux" ???

>     > Here again, we hit the platform vs OS question, but if the platform and OS

>     > are different things, then it should be OS here! If there are the same

>     > thing, then why not using the -with-platform which we already have...

>     >

>     > I guess we know what an OS is... but what is a platform?

>     > -The HW in which ODP is running (implies memory size limitation, different

>     > pktio interfaces...). This is my understanding, but odp/pltaform/linux-gen

>     > is missleading and should be called odp/os/linux-gen

>     > - A couple HW/OS, as this patch seems to imply?

>     >

>     > Christophe

>     >

>     > +    [],

>     We have the case here at Kalray where we have a single platform (mppa) but 2 supported OS depending on what the user wants to do (non ODP compliant code).

>     The OS has no impact on the platform, but changes the helpers.

>

>     So no the platform isn't fully OS dependent.

>     And yes the help string should be "select OS to be used"

>

>     Nicolas

>

>
Mike Holmes Dec. 13, 2016, 12:58 p.m. UTC | #5
You are right I should have said os, will fix in v2.

On 13 December 2016 at 04:22, Nicolas Morey-Chaisemartin <nmorey@kalray.eu>
wrote:

>

>

> Le 12/13/2016 à 09:54 AM, Christophe Milard a écrit :

>

> OK. this is somehow matching my understanding:

> . OS= linux, BSD, windows, OSE or mppa

> . Platform = HW board on which that stuff is run (implies different

> running parametrs, such as pktio interface names, mem sizes...)

>

> Not sure how to reflect that propåerly in the current structure, where

> platform really means both things (sometimes OS, sometimes HW), but that is

> the next step :-), if we at least can agree on the vocabulary...

>

> I'd  like to see a way forward with a nice clean structure reflecting

> these 2 concepts, but hopefully this patchset is a step towards it. (at

> least, it will show the problems that follows)

>

> Chrstophe

>

> mppa is not an OS but I agree ;)

>

> Nicolas

>

>

>

> On 13 December 2016 at 09:01, Nicolas Morey-Chaisemartin <nmorey@kalray.eu

> > wrote:

>

>>

>>

>> Le 12/13/2016 à 08:46 AM, Christophe Milard a écrit :

>> > On 12 December 2016 at 15:52, Mike Holmes <mike.holmes@linaro.org>

>> wrote:

>> >

>> >> Signed-off-by: Mike Holmes <mike.holmes@linaro.org>

>> >> ---

>> >>  configure.ac       | 14 ++++++++++++++

>> >>  helper/Makefile.am |  2 +-

>> >>  2 files changed, 15 insertions(+), 1 deletion(-)

>> >>

>> >> diff --git a/configure.ac b/configure.ac

>> >> index 20ec479..39c040d 100644

>> >> --- a/configure.ac

>> >> +++ b/configure.ac

>> >> @@ -154,6 +154,19 @@ fi

>> >>  ODP_CFLAGS="$ODP_CFLAGS -DIMPLEMENTATION_NAME=$IMPLEMENTATION_NAME"

>> >>

>> >>  ############################################################

>> >> ##############

>> >> +# Determine which os to build helpers for

>> >> +###########################################################

>> >> ###############

>> >> +AC_ARG_WITH([os],

>> >> +    [AS_HELP_STRING([--with-os=os],

>> >> +       [select platform to be used, default linux])],

>> >>

>> > Shouldn't it be " select OS to be used, default linux" ???

>> > Here again, we hit the platform vs OS question, but if the platform and

>> OS

>> > are different things, then it should be OS here! If there are the same

>> > thing, then why not using the -with-platform which we already have...

>> >

>> > I guess we know what an OS is... but what is a platform?

>> > -The HW in which ODP is running (implies memory size limitation,

>> different

>> > pktio interfaces...). This is my understanding, but

>> odp/pltaform/linux-gen

>> > is missleading and should be called odp/os/linux-gen

>> > - A couple HW/OS, as this patch seems to imply?

>> >

>> > Christophe

>> >

>> > +    [],

>> We have the case here at Kalray where we have a single platform (mppa)

>> but 2 supported OS depending on what the user wants to do (non ODP

>> compliant code).

>> The OS has no impact on the platform, but changes the helpers.

>>

>> So no the platform isn't fully OS dependent.

>> And yes the help string should be "select OS to be used"

>>

>> Nicolas

>>

>

>

>



-- 
Mike Holmes
Program Manager - Linaro Networking Group
Linaro.org <http://www.linaro.org/> *│ *Open source software for ARM SoCs
"Work should be fun and collaborative, the rest follows"
diff mbox

Patch

diff --git a/configure.ac b/configure.ac
index 20ec479..39c040d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -154,6 +154,19 @@  fi
 ODP_CFLAGS="$ODP_CFLAGS -DIMPLEMENTATION_NAME=$IMPLEMENTATION_NAME"
 
 ##########################################################################
+# Determine which os to build helpers for
+##########################################################################
+AC_ARG_WITH([os],
+    [AS_HELP_STRING([--with-os=os],
+	[select platform to be used, default linux])],
+    [],
+    [with_os=linux
+    ])
+
+AC_SUBST([with_os])
+
+
+##########################################################################
 # Include m4 files
 ##########################################################################
 m4_include([./doc/m4/configure.m4])
@@ -323,6 +336,7 @@  AC_MSG_RESULT([
 	implementation_name:	${IMPLEMENTATION_NAME}
 	ARCH_DIR		${ARCH_DIR}
 	with_platform:		${with_platform}
+	with_os:		${with_os}
 	prefix:			${prefix}
 	sysconfdir:		${sysconfdir}
 	libdir:			${libdir}
diff --git a/helper/Makefile.am b/helper/Makefile.am
index 4e59850..3805c45 100644
--- a/helper/Makefile.am
+++ b/helper/Makefile.am
@@ -35,7 +35,7 @@  __LIB__libodphelper_linux_la_SOURCES = \
 					eth.c \
 					ip.c \
 					chksum.c \
-					os/linux/thread.c \
+					os/@with_os@/thread.c \
 					hashtable.c \
 					lineartable.c