Skip navigation

Standard Performance Evaluation Corporation

Facebook logo LinkedIn logo Twitter logo

Function alloca() for 126.gcc

Date: Tue, 30 Jan 96 8:46:44 MET

Someone got into problems with 126.gcc: It would not link because function "alloca()" was not found. On many UNIX systems (including SNI's SINIX), the library


which contains "alloca()" is not in the standard search path for libraries.

Suggested fix:
- Add a line

        EXTRA_LIBS = -L/usr/ucblib -lucb

in the file $SPEC/config/Your_Config_File.cfg for 126.gcc

The location of this library function may vary. Check your system's documentation to find the correct location.

Alternatively, if your compiler provides an option (compiler flag) for inlining of certain often-used library functions, sometimes "alloca()" is among these functions, try compiling with this flag. If this way is possible, the benchmark should run a bit faster since then a function "alloca()" probably more optimized for your system will be used.

Note: For cases where there is no "alloca()" available in your environment, a module containing the source code for "alloca()" is contained in directory


Copy the file alloca.c from this directory (the directory for alternative source files) to its parent directory (the directory where all the "normal" source files are), and it should work.