Re: Warning Flags Disappeared

2018-05-08 Thread Sebastian Huber
This change adds the warning flags. I don't know why CFLAGS is now 
present. There could be a problem somewhere else.


diff --git a/c/src/configure.ac b/c/src/configure.ac
index f4428ed221..7e4986e03d 100644
--- a/c/src/configure.ac
+++ b/c/src/configure.ac
@@ -100,7 +100,7 @@ RTEMS_PROG_CCAS
 RTEMS_CANONICALIZE_TOOLS

 # Append warning flags if CFLAGS wasn't set.
-AS_IF([test "$GCC" = yes && test "$rtems_cv_CFLAGS_set" != set],
+AS_IF([test "$GCC" = yes],
 [CFLAGS="$CFLAGS -Wall -Wmissing-prototypes 
-Wimplicit-function-declaration -Wstrict-prototypes -Wnested-externs"])


 AS_IF([test -n "${CFLAGS}"],[

On 19/04/18 15:18, Sebastian Huber wrote:

The problem is in c/src/configure.ac:

# Was CFLAGS set?
rtems_cv_CFLAGS_set="${CFLAGS+set}"

In this line CFLAGS is set. Later we have:

# Append warning flags if CFLAGS wasn't set.
AS_IF([test "$GCC" = yes && test "$rtems_cv_CFLAGS_set" != set],
[CFLAGS="$CFLAGS -Wall -Wmissing-prototypes 
-Wimplicit-function-declaration -Wstrict-prototypes -Wnested-externs"])




--
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail  : sebastian.hu...@embedded-brains.de
PGP : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: Warning Flags Disappeared

2018-05-08 Thread Chris Johns
On 8/5/18 5:17 pm, Sebastian Huber wrote:
> This change adds the warning flags. I don't know why CFLAGS is now present.

What do you mean by this last sentence?

> There could be a problem somewhere else.

The support was added back in 2011 )d71462b4eb38efbcda6d429a0a61749d7a89e195).

I moved this:

 # Was CFLAGS set?
 rtems_cv_CFLAGS_set="${CFLAGS+set}"

into aclocal/rtems-includes.m4 in the preinstall removal.

Chris

> 
> diff --git a/c/src/configure.ac b/c/src/configure.ac
> index f4428ed221..7e4986e03d 100644
> --- a/c/src/configure.ac
> +++ b/c/src/configure.ac
> @@ -100,7 +100,7 @@ RTEMS_PROG_CCAS
>  RTEMS_CANONICALIZE_TOOLS
> 
>  # Append warning flags if CFLAGS wasn't set.
> -AS_IF([test "$GCC" = yes && test "$rtems_cv_CFLAGS_set" != set],
> +AS_IF([test "$GCC" = yes],
>  [CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wimplicit-function-declaration
> -Wstrict-prototypes -Wnested-externs"])
> 
>  AS_IF([test -n "${CFLAGS}"],[
> 
> On 19/04/18 15:18, Sebastian Huber wrote:
>> The problem is in c/src/configure.ac:
>>
>> # Was CFLAGS set?
>> rtems_cv_CFLAGS_set="${CFLAGS+set}"
>>
>> In this line CFLAGS is set. Later we have:
>>
>> # Append warning flags if CFLAGS wasn't set.
>> AS_IF([test "$GCC" = yes && test "$rtems_cv_CFLAGS_set" != set],
>> [CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wimplicit-function-declaration
>> -Wstrict-prototypes -Wnested-externs"])
>>
> 
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: Warning Flags Disappeared

2018-05-08 Thread Sebastian Huber

On 08/05/18 11:10, Chris Johns wrote:

On 8/5/18 5:17 pm, Sebastian Huber wrote:

This change adds the warning flags. I don't know why CFLAGS is now present.

What do you mean by this last sentence?


We have:

grep '\' -n c/src/configure
640:CFLAGS
759:CFLAGS
1332:To assign environment variables (e.g., CC, CFLAGS...), specify them as
1434:  CFLAGS  C compiler flags
1445:  CCASFLAGS   assembler compiler flags (defaults to CFLAGS)
2023:ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2024:ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS 
conftest.$ac_ext $LIBS >&5'

2843:# AC_ARG_VAR([CPU_CFLAGS],[CFLAGS specifying CPU-dependent features])
2844:# AC_ARG_VAR([CFLAGS_OPTIMIZE_V],[CFLAGS for building the OPTIMIZE 
variant])

2845:# AC_ARG_VAR([CFLAGS_DEBUG_V],[CFLAGS for building the DEBUG variant])
3070:# Was CFLAGS set?
3071:rtems_cv_CFLAGS_set="${CFLAGS+set}"
3073:CFLAGS="${CFLAGS-${CPU_CFLAGS} ${CFLAGS_OPTIMIZE_V}}"
3185:ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3186:ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS 
conftest.$ac_ext $LIBS >&5'

3796:ac_test_CFLAGS=${CFLAGS+set}
3797:ac_save_CFLAGS=$CFLAGS
3806:   CFLAGS="-g"
3821:  CFLAGS=""
3837:    CFLAGS="-g"
3862:  CFLAGS=$ac_save_CFLAGS
3865:    CFLAGS="-g -O2"
3867:    CFLAGS="-g"
3871:    CFLAGS="-O2"
3873:    CFLAGS=
3968:ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3969:ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS 
conftest.$ac_ext $LIBS >&5'

4102:ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4103:ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS 
conftest.$ac_ext $LIBS >&5'

4233:ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4234:ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS 
conftest.$ac_ext $LIBS >&5'

4325:# Was CFLAGS set?
4326:rtems_cv_CFLAGS_set="${CFLAGS+set}"
4392:# If CXXFLAGS is not set, default to CFLAGS
4394:  CXXFLAGS=${CXXFLAGS-${CFLAGS} -std=gnu++11}
4396:  CXXFLAGS=${CXXFLAGS-${CFLAGS}}
4716:ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4717:ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS 
conftest.$ac_ext $LIBS >&5'

4977:ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4978:ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS 
conftest.$ac_ext $LIBS >&5'

5131:test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
5440:# Append warning flags if CFLAGS wasn't set.
5442:  CFLAGS="$CFLAGS -Wall -Wmissing-prototypes 
-Wimplicit-function-declaration -Wstrict-prototypes -Wnested-externs"

5445:if test -n "${CFLAGS}"; then :
5447:ac_configure_args="$ac_configure_args 'CFLAGS=${CFLAGS}'"
5460:    save_CFLAGS=$CFLAGS
5461:    CFLAGS=-Werror
5486:    CFLAGS=$save_CFLAGS

This CFLAGS is not set before line 3071 in the script. The caller must 
have provided it. I don't know how the caller did achieve this and why.





There could be a problem somewhere else.

The support was added back in 2011 )d71462b4eb38efbcda6d429a0a61749d7a89e195).

I moved this:

  # Was CFLAGS set?
  rtems_cv_CFLAGS_set="${CFLAGS+set}"

into aclocal/rtems-includes.m4 in the preinstall removal.

Chris


diff --git a/c/src/configure.ac b/c/src/configure.ac
index f4428ed221..7e4986e03d 100644
--- a/c/src/configure.ac
+++ b/c/src/configure.ac
@@ -100,7 +100,7 @@ RTEMS_PROG_CCAS
  RTEMS_CANONICALIZE_TOOLS

  # Append warning flags if CFLAGS wasn't set.
-AS_IF([test "$GCC" = yes && test "$rtems_cv_CFLAGS_set" != set],
+AS_IF([test "$GCC" = yes],
  [CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wimplicit-function-declaration
-Wstrict-prototypes -Wnested-externs"])

  AS_IF([test -n "${CFLAGS}"],[

On 19/04/18 15:18, Sebastian Huber wrote:

The problem is in c/src/configure.ac:

# Was CFLAGS set?
rtems_cv_CFLAGS_set="${CFLAGS+set}"

In this line CFLAGS is set. Later we have:

# Append warning flags if CFLAGS wasn't set.
AS_IF([test "$GCC" = yes && test "$rtems_cv_CFLAGS_set" != set],
[CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wimplicit-function-declaration
-Wstrict-prototypes -Wnested-externs"])



--
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail  : sebastian.hu...@embedded-brains.de
PGP : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: Warning Flags Disappeared

2018-05-08 Thread Chris Johns
On 8/5/18 7:18 pm, Sebastian Huber wrote:
> 
> This CFLAGS is not set before line 3071 in the script. The caller must have
> provided it. I don't know how the caller did achieve this and why.
> 

Is it ...

  CFLAGS="-Wxx -Wyyy -Os" ../rtems/configure ...

?

Chris
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: Warning Flags Disappeared

2018-05-08 Thread Sebastian Huber

On 08/05/18 11:50, Chris Johns wrote:

On 8/5/18 7:18 pm, Sebastian Huber wrote:

This CFLAGS is not set before line 3071 in the script. The caller must have
provided it. I don't know how the caller did achieve this and why.


Is it ...

   CFLAGS="-Wxx -Wyyy -Os" ../rtems/configure ...

?


This was probably the reason for this check. However, if you don't have 
CFLAGS set in your top level configure shell environment, the CFLAGS is 
still set in c/src/configure.


--
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail  : sebastian.hu...@embedded-brains.de
PGP : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

[PATCH] x86_64/gcc: Have gcc build crti.o and crtn.o

2018-05-08 Thread Amaan Cheval
The original commit in GCC's repo is here:
https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=ab55f7db3694293e4799d58f7e1a556c0eae863a

We need this to be able to use crti.o and crtn.o in the bsp_specs file for the
port, and therefore provide missing symbols like "_fini" which RTEMS assumes are
defined in:

./cpukit/libcsupport/src/newlibc_exit.c
---
 rtems/config/5/rtems-x86_64.bset | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/rtems/config/5/rtems-x86_64.bset b/rtems/config/5/rtems-x86_64.bset
index 951ae85..9b92538 100644
--- a/rtems/config/5/rtems-x86_64.bset
+++ b/rtems/config/5/rtems-x86_64.bset
@@ -8,4 +8,10 @@
 %patch add gcc --rsb-file=gcc-99c7ae16793d88d7c16c692fb468ab308cb4d12d.patch 
https://gcc.gnu.org/git/?p=gcc.git;a=blobdiff_plain;f=gcc/config.gcc;h=99c7ae16793d88d7c16c692fb468ab308cb4d12d;hp=ae19655bf328e29ea4f00966b5060967684a7f1b;hb=602fa1e9d3ea5e87d4d6e17e3e91fc2647e42da3;hpb=7ea6a6472d360c634a00358dbaab2e236e785367
 %hash sha512 gcc-99c7ae16793d88d7c16c692fb468ab308cb4d12d.patch 
ed519aacb199be54bce514bd6745cf532d66250f0163e8be6b6e630d83ec1a68e086467320f589191dce3a7638bdc867663f38dfc569ee2f27c6b686c040130f
 
+#
+# Have gcc build crti.o and crtn.o
+#
+%patch add gcc --rsb-file=gcc-f8fd78279d353f6959e75ac25571c1b7b2dec110.patch 
https://gcc.gnu.org/git/?p=gcc.git;a=blobdiff_plain;f=libgcc/config.host;h=f8fd78279d353f6959e75ac25571c1b7b2dec110;hp=11b4acaff55e00ee6bd3c182e9da5dc597ac57c4;hb=ab55f7db3694293e4799d58f7e1a556c0eae863a;hpb=344c180cca810c50f38fd545bb9a102fb39306b7
+%hash sha512 gcc-f8fd78279d353f6959e75ac25571c1b7b2dec110.patch 
aef76f9d45a53096a021521375fc302a907f78545cc57683a7a00ec61608b8818115720f605a6b1746f479c8568963b380138520e259cbb9e8951882c2f1567f
+
 %include 5/rtems-default.bset
-- 
2.13.0

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


need for bsp_specs on x86_64

2018-05-08 Thread Joel Sherrill
Hi

I have a working branch that I managed to shrink bsp_specs to
being empty on some targets. It would be nice if we could
do this from the beginning on x86_64.

Are the options triggered by -qrtems really needed or implied
already?

For the BSPs I worked through, it was easy to move the start
file specification to the linkcmds and eliminate the specification
of libraries since they were mostly already correct inside gcc.

Thanks.

--joel
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel