Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add platform support for Linux/m68k for the 3.0 branch #52

Merged
merged 3 commits into from
Oct 14, 2016

Conversation

glaubitz
Copy link
Contributor

Hello!

This changeset adds Linux/m68k support to the 3.0 branch of Firebird.

Thanks,
Adrian

glaubitz and others added 2 commits October 13, 2016 16:22
…ALIGN

On m68k, 'long long' is 16-bit aligned while 'sem_t' is 32-bit aligned
and we must therefore include 'sem_t' when determining the values for
FB_ALIGNMENT and FB_DOUBLE_ALIGN. Otherwise, the futex system call
will fail on these systems.
@glaubitz
Copy link
Contributor Author

I just added another patch on top to fix the generator script for the linker version script.

The version scripts must include _IO_stdin_used when using the glibc as otherwise the application can crash or caused unexpected behavior on some architectures, see:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=840666
http://lists.gnu.org/archive/html/bug-glibc/2001-12/msg00203.html

The GNU C library supports two ABIs for libio, one is the pre-2.1
ABI and the other is the current one. In order to determine which
ABI is to be used, the C library checks whether the _IO_stdin_used
symbol is exported by the executable. In case the symbol is present,
the new ABI is assumed, if the symbol is missing, the old ABI is
assumed. Thus, if an application is linked against a modern version
of glibc, it must export the _IO_stdin_used symbol as otherwise the
executable can crash or provoke other unexpected behavior on some
architectures like PowerPC or MIPS because the C library is using
the old ABI in this case.
@AlexPeshkoff AlexPeshkoff merged commit bd35281 into FirebirdSQL:B3_0_Release Oct 14, 2016
@themaddoctor
Copy link

Is there a similar fix for 2.5.8? It does not have the file that you patch, nor does it have a file containing the line that you change (in that directory).

@glaubitz
Copy link
Contributor Author

@themaddoctor No, there is no similar fix for 2.5.8 because 2.5.8 isn't affected by this particular bug.

@themaddoctor
Copy link

That what is this bug if it is not the same one?

With gcc 7.1.0 on x86_64, and firebird 2.5.8 sources, I'm getting this:

make[2]: *** [../gen/Makefile.refDatabases:68: empty.fdb] Segmentation fault

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants