Hi Theo

Yes, this is what I'm seeing.

The abort (ref google) appears to be due to the absence of some of the builtins referred to at line 54 of pngshim.c

If I rearrange the conditional it'll go past that, then fails around line 110 calling the routine determined by line54 et al .. seems to be looking for a builtin that isn't 'responding'. gcc source suggests the builtin should be there..

This is the patch pngshim.c.p I used to get past the abort .. cludgy I know ..

JB



--- src/sfnt/pngshim.c.orig     2017-09-16 14:01:48.000000000 +0100
+++ src/sfnt/pngshim.c  2018-04-12 21:24:14.397961733 +0100
@@ -61,16 +61,13 @@
     /* predates clang; the `__BYTE_ORDER__' preprocessor symbol was */
     /* introduced in gcc 4.6 and clang 3.2, respectively.           */
     /* `__builtin_shuffle' for gcc was introduced in gcc 4.7.0.     */
-#if ( ( defined( __GNUC__ ) &&             \
-        ( ( __GNUC__ >= 5 ) ||               \
-        ( ( __GNUC__ == 4 ) && ( __GNUC_MINOR__ >= 7 ) ) ) )         ||   \
-      ( defined( __clang__ )                                       &&     \
-        ( ( __clang_major__ >= 4 )                               ||       \
-        ( ( __clang_major__ == 3 ) && ( __clang_minor__ >= 2 ) ) ) ) ) && \
-    defined( __OPTIMIZE__ )                                            && \
-    __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+#ifdef  __GNUC__
+#if ( ( __GNUC__ >= 5 ) || ( ( __GNUC__ == 4 ) && ( __GNUC_MINOR__ >= 7 ) ) )
+#ifdef __clang__
+#if ( ( __clang_major__ >= 4 ) || ( ( __clang_major__ == 3 ) && ( __clang_minor__ >= 2 ) ) )
+#ifdef  __OPTIMIZE__
+#if  __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__

-#ifdef __clang__
     /* the clang documentation doesn't cover the two-argument case of */
     /* `__builtin_shufflevector'; however, it is is implemented since */
     /* version 2.8                                                    */
@@ -78,6 +75,11 @@
 #else
 #define vector_shuffle  __builtin_shuffle
 #endif
+#endif
+#endif
+#endif
+#endif
+#endif

     typedef unsigned short  v82 __attribute__(( vector_size( 16 ) ));









On 12/04/2018 23:21, Theo Markettos wrote:
On Thu, Apr 12, 2018 at 10:19:38PM +0100, John Ballance wrote:
Advice appreciated

I have recently built gcc etc on a (more modern) linux machine.

build seems fine

gcc version reports as arm-unknown-riscos-gcc (GCCSDK GCC 4.7.4 Release 3)
4.7.4

However the __builtin_shuffle built in function appear missing (as needed at
libfreetype6 src/sfnt/pngshim.c

The package builds fine in jenkins on ci.riscos.info so I have to assume
something failed or is configured out in my build
The build on ci.riscos.info was 9 months old and didn't work.
I just built it again and it reports:
https://ci.riscos.info/job/packages/job/libfreetype6/10/console

./builds/unix/libtool --mode=compile /home/riscos/env/arm-unknown-riscos-gcc -pedantic -ansi 
-I/home/jenkins-slave/workspace/packages/libfreetype6/autobuilder/libfreetype6/freetype-2.8.1/src/autofit 
-I/home/jenkins-slave/workspace/packages/libfreetype6/autobuilder/libfreetype6/freetype-2.8.1/objs 
-I./builds/unix 
-I/home/jenkins-slave/workspace/packages/libfreetype6/autobuilder/libfreetype6/freetype-2.8.1/include  -c -Wall 
-O3 -I/home/riscos/env/include   -DFT_CONFIG_OPTION_SYSTEM_ZLIB  -DFT_CONFIG_OPTION_USE_BZIP2 
-I/usr/include/libpng12 -DFT_CONFIG_OPTION_USE_PNG -DFT_CONFIG_CONFIG_H="<ftconfig.h>" 
-DFT2_BUILD_LIBRARY -DFT_CONFIG_MODULES_H="<ftmodule.h>"  -o 
/home/jenkins-slave/workspace/packages/libfreetype6/autobuilder/libfreetype6/freetype-2.8.1/objs/autofit.lo 
/home/jenkins-slave/workspace/packages/libfreetype6/autobuilder/libfreetype6/freetype-2.8.1/src/autofit/autofit.c
In file included from 
/home/jenkins-slave/workspace/packages/libfreetype6/autobuilder/libfreetype6/freetype-2.8.1/src/sfnt/sfnt.c:22:0:
/home/jenkins-slave/workspace/packages/libfreetype6/autobuilder/libfreetype6/freetype-2.8.1/src/sfnt/pngshim.c:
 In function 'premultiply_data':
/home/jenkins-slave/workspace/packages/libfreetype6/autobuilder/libfreetype6/freetype-2.8.1/src/sfnt/pngshim.c:54:3:
 internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gccsdk.riscos.info/> for instructions.

so something Isn't Happy.  But I'm not sure if it's a different kind of Not
Happy from what you're seeing.

The build is picking up some antique dependencies, so I'm rebuilding those
to see if that makes a difference.

I don't think the changes I made recently (supporting a new gperf, allowing
automake to run with a newer perl) will have materially changed things.  The
ci.riscos.info build environment at least hasn't changed.

It seems the last successful build in Jenkins was the Debian 'stretch'
package which was libfreetype6 2.6.3, while the current attempt is 'buster's
2.8.1.  In the interim the __builtin_shuffle code was introduced.

So I suspect GCC's __builtin_shuffle is indeed broken in some way.
Does anyone know about this code?

There is https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59378
but that relates to C++.

A workaround is to patch libfreetype6 to avoid the use of __builtin_shuffle.

Theo

_______________________________________________
GCCSDK mailing list gcc@gccsdk.riscos.info
Bugzilla: http://www.riscos.info/bugzilla/index.cgi
List Info: http://www.riscos.info/mailman/listinfo/gcc
Main Page: http://www.riscos.info/index.php/GCCSDK

--
Stop press! Just announced -

Jan 2018: Which? rates us No.1 for satisfied energy customers, and No.1 for Home Phone, Broadband, and mobile

For full details of see https://www.utilitywarehouse.co.uk/reviews?exref=095761
<https://www.utilitywarehouse.co.uk/reviews?exref=095761>

Intrigued? Call me

John Ballance C.Eng MIET - j...@macpcrepair.co.uk - 07976 295923

_______________________________________________
GCCSDK mailing list gcc@gccsdk.riscos.info
Bugzilla: http://www.riscos.info/bugzilla/index.cgi
List Info: http://www.riscos.info/mailman/listinfo/gcc
Main Page: http://www.riscos.info/index.php/GCCSDK

Reply via email to