ggnfs-0.77.1-gentoo.patch 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. src/Makefile | 34 +++++++++++++++++-----------------
  2. src/lasieve4/Makefile | 6 +++---
  3. src/pol5/Makefile | 8 ++++----
  4. 3 files changed, 24 insertions(+), 24 deletions(-)
  5. diff --git a/src/Makefile b/src/Makefile
  6. index 01f66be..59b433f 100644
  7. --- a/src/Makefile
  8. +++ b/src/Makefile
  9. @@ -1,15 +1,15 @@
  10. # Workaround for PPC
  11. # Due to unknown reason -march isn't supported there
  12. ifeq ($(ARCH),970)
  13. - ALLOPT=-mcpu=$(ARCH) -m64 -pipe
  14. + ALLOPT=
  15. else
  16. - ALLOPT=-march=$(ARCH) -pipe
  17. + ALLOPT=
  18. endif
  19. INC=-I. -I.. -I../include $(LOCALINC)
  20. LIBS=-lgmp -lm
  21. BINDIR=../bin
  22. -LIBFLAGS=$(LOCALLIB)
  23. +LDFLAGS+=$(LOCALLIB)
  24. MATBUILD_TPIE=0
  25. TPIE_DIR=../../tpie
  26. @@ -17,7 +17,7 @@ TPIE_DIR=../../tpie
  27. # Turn on\off workaround for GMP 4.2 bug
  28. # Consult http://swox.com/list-archives/gmp-bugs/2006-May/000475.html
  29. # for more info
  30. -GMP_BUG=1
  31. +GMP_BUG=0
  32. ifeq ($(HOST),generic)
  33. ALLOPT+= -DGGNFS_HOST_GENERIC
  34. @@ -32,10 +32,10 @@ ifeq ($(ARCH),prescott)
  35. ALLOPT+= -DL2_CACHE_SIZE=1024
  36. endif
  37. -DEBUGOPT=-W -Wall -g -pg
  38. +DEBUGOPT=-W -Wall
  39. -CFLAGS=-DNDEBUG -O3 -funroll-loops -finline-functions \
  40. - -ftracer -fomit-frame-pointer -W -Wall $(ALLOPT)
  41. +CFLAGS+=-DNDEBUG \
  42. + -W -Wall $(ALLOPT)
  43. # CFLAGS=$(DEBUGOPT) $(ALLOPT)
  44. # -ffast-math removed since -funsafe-math-optimizations seems to cause occasional problems, especially in sqrt
  45. @@ -71,7 +71,7 @@ endif
  46. ifeq ($(MATBUILD_TPIE),1)
  47. BINS+= $(BINDIR)/matbuild-tpie
  48. INC+= -I$(TPIE_DIR)/include
  49. - LIBFLAGS+= -L$(TPIE_DIR)/lib
  50. + LDFLAGS+= -L$(TPIE_DIR)/lib
  51. LIBS+=-ltpie
  52. endif
  53. @@ -97,35 +97,35 @@ bins : $(BINS)
  54. $(CC) $(CFLAGS) -o $@ -c $*.S
  55. $(BINDIR)/sieve : sieve.c clsieve.c $(OBJS) makefb.o
  56. - $(CC) $(INC) $(CFLAGS) $(LIBFLAGS) -o $@ $^ $(LIBS)
  57. + $(CC) $(INC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
  58. $(BINDIR)/makefb : makefb.c $(OBJS)
  59. - $(CC) $(INC) $(CFLAGS) $(LIBFLAGS) -D_MAKEFB_STANDALONE -o $@ \
  60. + $(CC) $(INC) $(CFLAGS) $(LDFLAGS) -D_MAKEFB_STANDALONE -o $@ \
  61. makefb.c $(OBJS) $(LIBS)
  62. $(BINDIR)/procrels : procrels.c $(OBJS)
  63. - $(CC) $(INC) $(CFLAGS) $(LIBFLAGS) -o $@ procrels.c $(OBJS) $(LIBS)
  64. + $(CC) $(INC) $(CFLAGS) $(LDFLAGS) -o $@ procrels.c $(OBJS) $(LIBS)
  65. $(BINDIR)/matbuild : matbuild.c $(OBJS)
  66. - $(CC) $(INC) $(CFLAGS) $(LIBFLAGS) -o $@ matbuild.c combparts.c \
  67. + $(CC) $(INC) $(CFLAGS) $(LDFLAGS) -o $@ matbuild.c combparts.c \
  68. $(OBJS) $(LIBS)
  69. $(BINDIR)/matbuild-tpie : matbuild.c $(OBJS)
  70. - $(CPP) $(INC) $(CFLAGS) $(LIBFLAGS) -DGGNFS_TPIE -o $@ matbuild.c \
  71. + $(CPP) $(INC) $(CFLAGS) $(LDFLAGS) -DGGNFS_TPIE -o $@ matbuild.c \
  72. experimental/combparts_tpie.cpp experimental/llist_tpie.cpp \
  73. $(OBJS) $(LIBS)
  74. $(BINDIR)/matprune : matprune.c $(OBJS)
  75. - $(CC) $(INC) $(CFLAGS) $(LIBFLAGS) -o $@ matprune.c $(OBJS) $(LIBS)
  76. + $(CC) $(INC) $(CFLAGS) $(LDFLAGS) -o $@ matprune.c $(OBJS) $(LIBS)
  77. $(BINDIR)/matsolve : matsolve.c $(OBJS)
  78. - $(CC) $(INC) $(CFLAGS) $(LIBFLAGS) -o $@ matsolve.c $(OBJS) $(LIBS)
  79. + $(CC) $(INC) $(CFLAGS) $(LDFLAGS) -o $@ matsolve.c $(OBJS) $(LIBS)
  80. $(BINDIR)/sqrt : sqrt.c $(OBJS)
  81. - $(CC) $(INC) $(CFLAGS) $(LIBFLAGS) -o $@ sqrt.c $(OBJS) $(LIBS)
  82. + $(CC) $(INC) $(CFLAGS) $(LDFLAGS) -o $@ sqrt.c $(OBJS) $(LIBS)
  83. $(BINDIR)/polyselect : polyselect.c $(OBJS)
  84. - $(CC) $(INC) $(CFLAGS) $(LIBFLAGS) -o $@ polyselect.c $(OBJS) $(LIBS)
  85. + $(CC) $(INC) $(CFLAGS) $(LDFLAGS) -o $@ polyselect.c $(OBJS) $(LIBS)
  86. latsiever :
  87. $(MAKE) -C lasieve4
  88. diff --git a/src/lasieve4/Makefile b/src/lasieve4/Makefile
  89. index 31e05a9..6886b16 100644
  90. --- a/src/lasieve4/Makefile
  91. +++ b/src/lasieve4/Makefile
  92. @@ -10,8 +10,8 @@
  93. # 6/13/04: Hacked up for use in GGNFS by Chris Monico.
  94. INC=-I.. -I../../include $(LOCALINC)
  95. -LIBFLAGS=-L. $(LOCALLIB)
  96. -CFLAGS+=-Os
  97. +LDFLAGS+=-L. $(LOCALLIB)
  98. +CFLAGS+=
  99. BINDIR=../../bin
  100. FACT=prho.o
  101. @@ -58,7 +58,7 @@ gnfs-lasieve4eI%.o: gnfs-lasieve4e.c lasieve.h asm/siever-config.h
  102. $(BINDIR)/gnfs-lasieve4I%e: gnfs-lasieve4eI%.o $(OBJS) libgmp-aux.a \
  103. asm/liblasieve.a asm/liblasieveI%.a $(FACT)
  104. - $(CC) $(CFLAGS) $(INC) $(LIBFLAGS) -o $@ $^ $(LIBS)
  105. + $(CC) $(CFLAGS) $(INC) $(LDFLAGS) -o $@ $^ $(LIBS)
  106. asm/lib%.a:
  107. $(MAKE) -C asm
  108. diff --git a/src/pol5/Makefile b/src/pol5/Makefile
  109. index 44b08be..e474ffb 100644
  110. --- a/src/pol5/Makefile
  111. +++ b/src/pol5/Makefile
  112. @@ -1,6 +1,6 @@
  113. BINDIR=../../bin
  114. INC=-I.. -I../../include $(LOCALINC)
  115. -LIBFLAGS=$(LOCALLIB)
  116. +LDFLAGS+=$(LOCALLIB)
  117. LIBS=-lm -lgmp
  118. CFLAGS2=
  119. @@ -46,13 +46,13 @@ all: $(BINS)
  120. $(CC) $(INC) -c $(CFLAGS) $(CFLAGS2) $^
  121. $(BINDIR)/pol51m0b: pol51m0b.o $(OBJS) $(OBJS2)
  122. - $(CC) $(INC) -o $@ $(CFLAGS) $(CFLAGS2) $^ $(LIBFLAGS) $(LIBS)
  123. + $(CC) $(INC) $(LDFLAGS) -o $@ $(CFLAGS) $(CFLAGS2) $^ $(LIBS)
  124. $(BINDIR)/pol51m0n: pol51m0n.o $(OBJS) $(OBJS3)
  125. - $(CC) $(INC) $(CFLAGS) $(CFLAGS2) -o $@ $^ $(LIBFLAGS) $(LIBS)
  126. + $(CC) $(INC) $(CFLAGS) $(CFLAGS2) $(LDFLAGS) -o $@ $^ $(LIBS)
  127. $(BINDIR)/pol51opt: pol51opt.o $(OBJS) $(OBJS4)
  128. - $(CC) $(INC) $(CFLAGS) $(CFLAGS2) -o $@ $^ $(LIBFLAGS) $(LIBS)
  129. + $(CC) $(INC) $(CFLAGS) $(CFLAGS2) $(LDFLAGS) -o $@ $^ $(LIBS)
  130. clean : ;
  131. rm -f $(BINS) *.o core