diff mbox

[U-Boot] break build if it would produce broken binary

Message ID 20150413124928.GB19441@amd
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Pavel Machek April 13, 2015, 12:49 p.m. UTC
Add an error in known-bad case so that we don't produce broken and
hard to debug binaries.
    
Signed-off-by: Pavel Machek <pavel@denx.de>

Comments

Tom Rini April 13, 2015, 12:52 p.m. UTC | #1
On Mon, Apr 13, 2015 at 02:49:28PM +0200, Pavel Machek wrote:

> Add an error in known-bad case so that we don't produce broken and
> hard to debug binaries.
>     
> Signed-off-by: Pavel Machek <pavel@denx.de>
> 
> diff --git a/arch/arm/include/asm/u-boot.h b/arch/arm/include/asm/u-boot.h
> index 43cc494..ae4c21b 100644
> --- a/arch/arm/include/asm/u-boot.h
> +++ b/arch/arm/include/asm/u-boot.h
> @@ -49,4 +49,8 @@ typedef struct bd_info {
>  #define IH_ARCH_DEFAULT IH_ARCH_ARM64
>  #endif
>  
> +#if defined(CONFIG_USE_PRIVATE_LIBGCC) && defined(CONFIG_SYS_THUMB_BUILD)
> +#error Thumb build does not work with private libgcc.
> +#endif
> +
>  #endif	/* _U_BOOT_H_ */

I'm agreeable to taking this for the release if you'll go and debug
what's wrong with our private libgcc code for the next release.
Pavel Machek April 13, 2015, 8:38 p.m. UTC | #2
On Mon 2015-04-13 08:52:52, Tom Rini wrote:
> On Mon, Apr 13, 2015 at 02:49:28PM +0200, Pavel Machek wrote:
> 
> > Add an error in known-bad case so that we don't produce broken and
> > hard to debug binaries.
> >     
> > Signed-off-by: Pavel Machek <pavel@denx.de>
> > 
> > diff --git a/arch/arm/include/asm/u-boot.h b/arch/arm/include/asm/u-boot.h
> > index 43cc494..ae4c21b 100644
> > --- a/arch/arm/include/asm/u-boot.h
> > +++ b/arch/arm/include/asm/u-boot.h
> > @@ -49,4 +49,8 @@ typedef struct bd_info {
> >  #define IH_ARCH_DEFAULT IH_ARCH_ARM64
> >  #endif
> >  
> > +#if defined(CONFIG_USE_PRIVATE_LIBGCC) && defined(CONFIG_SYS_THUMB_BUILD)
> > +#error Thumb build does not work with private libgcc.
> > +#endif
> > +
> >  #endif	/* _U_BOOT_H_ */
> 
> I'm agreeable to taking this for the release if you'll go and debug
> what's wrong with our private libgcc code for the next release.

If you are willing to ship u-boot with known and nasty to debug
problem, it is your choice.

Either the patch is good or it is bad, my future plans should have
nothing to do with it. Notice that this patch does not help _me_ in
any way, as I know about the issue and am unlikely to hit it again,
and that original problem still breaks the build on my system.

Help from someone knowing ARM assembly would be nice. Now that we know
what the problem is, it should not be too bad.

Best regards,
									Pavel
Simon Glass June 2, 2015, 5:11 p.m. UTC | #3
Hi,

On 13 April 2015 at 14:38, Pavel Machek <pavel@denx.de> wrote:
>
> On Mon 2015-04-13 08:52:52, Tom Rini wrote:
> > On Mon, Apr 13, 2015 at 02:49:28PM +0200, Pavel Machek wrote:
> >
> > > Add an error in known-bad case so that we don't produce broken and
> > > hard to debug binaries.
> > >
> > > Signed-off-by: Pavel Machek <pavel@denx.de>
> > >
> > > diff --git a/arch/arm/include/asm/u-boot.h b/arch/arm/include/asm/u-boot.h
> > > index 43cc494..ae4c21b 100644
> > > --- a/arch/arm/include/asm/u-boot.h
> > > +++ b/arch/arm/include/asm/u-boot.h
> > > @@ -49,4 +49,8 @@ typedef struct bd_info {
> > >  #define IH_ARCH_DEFAULT IH_ARCH_ARM64
> > >  #endif
> > >
> > > +#if defined(CONFIG_USE_PRIVATE_LIBGCC) && defined(CONFIG_SYS_THUMB_BUILD)
> > > +#error Thumb build does not work with private libgcc.
> > > +#endif
> > > +
> > >  #endif     /* _U_BOOT_H_ */
> >
> > I'm agreeable to taking this for the release if you'll go and debug
> > what's wrong with our private libgcc code for the next release.
>
> If you are willing to ship u-boot with known and nasty to debug
> problem, it is your choice.
>
> Either the patch is good or it is bad, my future plans should have
> nothing to do with it. Notice that this patch does not help _me_ in
> any way, as I know about the issue and am unlikely to hit it again,
> and that original problem still breaks the build on my system.
>
> Help from someone knowing ARM assembly would be nice. Now that we know
> what the problem is, it should not be too bad.

I hit this also and I think it has to do with missing ENTRY/ENDPROC
macros. I sent a patch.

Pavel, your email seemed to me as a little sharp for the mailing list.

>
> Best regards,
>                                                                         Pavel

Regards,
Simon
Pavel Machek Aug. 13, 2015, 3:06 p.m. UTC | #4
On Tue 2015-06-02 11:11:35, Simon Glass wrote:
> Hi,
> 
> > > > index 43cc494..ae4c21b 100644
> > > > --- a/arch/arm/include/asm/u-boot.h
> > > > +++ b/arch/arm/include/asm/u-boot.h
> > > > @@ -49,4 +49,8 @@ typedef struct bd_info {
> > > >  #define IH_ARCH_DEFAULT IH_ARCH_ARM64
> > > >  #endif
> > > >
> > > > +#if defined(CONFIG_USE_PRIVATE_LIBGCC) && defined(CONFIG_SYS_THUMB_BUILD)
> > > > +#error Thumb build does not work with private libgcc.
> > > > +#endif
> > > > +
> > > >  #endif     /* _U_BOOT_H_ */
> > >
> > > I'm agreeable to taking this for the release if you'll go and debug
> > > what's wrong with our private libgcc code for the next release.
> >
> > If you are willing to ship u-boot with known and nasty to debug
> > problem, it is your choice.
> >
> > Either the patch is good or it is bad, my future plans should have
> > nothing to do with it. Notice that this patch does not help _me_ in
> > any way, as I know about the issue and am unlikely to hit it again,
> > and that original problem still breaks the build on my system.
...
> Pavel, your email seemed to me as a little sharp for the mailing list.

Well, I have to survive on the lkml, so I write sharp emails sometimes.

Sorry about that.

									Pavel#
(not a typo)
Marek Vasut Aug. 13, 2015, 5:41 p.m. UTC | #5
On Thursday, August 13, 2015 at 05:06:08 PM, Pavel Machek wrote:
> On Tue 2015-06-02 11:11:35, Simon Glass wrote:
> > Hi,
> > 
> > > > > index 43cc494..ae4c21b 100644
> > > > > --- a/arch/arm/include/asm/u-boot.h
> > > > > +++ b/arch/arm/include/asm/u-boot.h
> > > > > @@ -49,4 +49,8 @@ typedef struct bd_info {
> > > > > 
> > > > >  #define IH_ARCH_DEFAULT IH_ARCH_ARM64
> > > > >  #endif
> > > > > 
> > > > > +#if defined(CONFIG_USE_PRIVATE_LIBGCC) &&
> > > > > defined(CONFIG_SYS_THUMB_BUILD) +#error Thumb build does not work
> > > > > with private libgcc.
> > > > > +#endif
> > > > > +
> > > > > 
> > > > >  #endif     /* _U_BOOT_H_ */
> > > > 
> > > > I'm agreeable to taking this for the release if you'll go and debug
> > > > what's wrong with our private libgcc code for the next release.
> > > 
> > > If you are willing to ship u-boot with known and nasty to debug
> > > problem, it is your choice.
> > > 
> > > Either the patch is good or it is bad, my future plans should have
> > > nothing to do with it. Notice that this patch does not help _me_ in
> > > any way, as I know about the issue and am unlikely to hit it again,
> > > and that original problem still breaks the build on my system.
> 
> ...
> 
> > Pavel, your email seemed to me as a little sharp for the mailing list.
> 
> Well, I have to survive on the lkml, so I write sharp emails sometimes.

Well, this is not LKML.

Best regards,
Marek Vasut
diff mbox

Patch

diff --git a/arch/arm/include/asm/u-boot.h b/arch/arm/include/asm/u-boot.h
index 43cc494..ae4c21b 100644
--- a/arch/arm/include/asm/u-boot.h
+++ b/arch/arm/include/asm/u-boot.h
@@ -49,4 +49,8 @@  typedef struct bd_info {
 #define IH_ARCH_DEFAULT IH_ARCH_ARM64
 #endif
 
+#if defined(CONFIG_USE_PRIVATE_LIBGCC) && defined(CONFIG_SYS_THUMB_BUILD)
+#error Thumb build does not work with private libgcc.
+#endif
+
 #endif	/* _U_BOOT_H_ */