This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Add Berkeley qsort to libiberty to make GCC host-independent


Hi all,

    The qsort library function may have different behavior on
different hosts (say Linux vs MinGW).
    We may have different sorting results with qsort when there are
elements with the same key value.
    GCC uses qsort a lot. And the output of certain optimizations,
such as IRA, relies on the sorting result of this library function.
    The problem is that we may have different assembly code of GCC on
different hosts even with the same source file.
    Normally this is not what a GCC user expect to see.
    In order to fix this issue, I am adding Berkeley qsort to
libiberty in order to override the one from the library.

    Bootstrapped on x86_64-suse-linux, OK for trunk? Please help
commit this patch if it's OK.

Cheers,
Felix

Attachment: libiberty-add-qsort.diff
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]