]> git.pld-linux.org Git - packages/john.git/blob - john-x32.patch
2e2ae7514a4172168fb7f666e768b38d39091fae
[packages/john.git] / john-x32.patch
1 --- JohnTheRipper-d73288b91d92f3bd670c18d3853ddaf0e02159f0/src/m4/jtr_utility_macros.m4~        2018-10-31 14:46:02.000000000 +0100
2 +++ JohnTheRipper-d73288b91d92f3bd670c18d3853ddaf0e02159f0/src/m4/jtr_utility_macros.m4 2018-11-04 13:18:54.692843591 +0100
3 @@ -150,6 +150,30 @@
4  JTR_LIST_ADD_RESULT
5  ])
6  
7 +dnl @synopsis SET_X32_INCLUDES
8 +dnl @summary check and set some x32 bit includes
9 +dnl This might be a Bad Idea[tm] if cross compiling.
10 +AC_DEFUN([JTR_SET_X32_INCLUDES],
11 +[
12 +  AC_MSG_CHECKING([additional paths (x32)])
13 +  ADD_LDFLAGS=""
14 +  ADD_CFLAGS=""
15 +if test -d /usr/local/libx32; then
16 +   ADD_LDFLAGS="$ADD_LDFLAGS -L/usr/local/libx32"
17 +fi
18 +if test -d /usr/libx32; then
19 +   ADD_LDFLAGS="$ADD_LDFLAGS -L/usr/libx32"
20 +fi
21 +if test -d /libx32; then
22 +   ADD_LDFLAGS="$ADD_LDFLAGS -L/libx32"
23 +fi
24 +JTR_LIST_ADD(CPPFLAGS, [$ADD_CFLAGS]) # no typo here
25 +jtr_list_add_result=""
26 +JTR_LIST_ADD(LDFLAGS, [$ADD_LDFLAGS])
27 +JTR_LIST_ADD(CFLAGS, [$ADD_CFLAGS])
28 +JTR_LIST_ADD_RESULT
29 +])
30 +
31  
32  dnl @synopsis SET_NORMAL_SSL_INCLUDES(base path)
33  dnl @summary check and set include/library paths for OpenSSL
34 --- JohnTheRipper-d73288b91d92f3bd670c18d3853ddaf0e02159f0.orig/src/configure.ac        2018-10-31 14:46:02.000000000 +0100
35 +++ JohnTheRipper-d73288b91d92f3bd670c18d3853ddaf0e02159f0/src/configure.ac     2018-11-04 13:18:54.656175005 +0100
36 @@ -269,11 +269,11 @@
37  case "$host_cpu" in
38    ia64|mips64|mips64eb|mipseb64|mips64el|mipsel64|mips64*|powerpc64*|sparc64|x86_64)
39      CFLAGS_EX=""
40 -    JTR_FLAG_CHECK_LINK([-m64], 1)
41 +    JTR_FLAG_CHECK_LINK([-mx32], 1)
42      if test "x${CFLAGS_EX}" != x ; then
43 -      LDFLAGS="-m64 $LDFLAGS"
44 -      CFLAGS="-m64 $CFLAGS"
45 -      ASFLAGS="-m64 $ASFLAGS"
46 +      LDFLAGS="-mx32 $LDFLAGS"
47 +      CFLAGS="-mx32 $CFLAGS"
48 +      ASFLAGS="-mx32 $ASFLAGS"
49      fi
50      ;;
51    *)
52 @@ -307,10 +307,33 @@
53     [AC_MSG_RESULT([32-bit])]
54  )
55  
56 +dnl Check for x32 environment
57 +AC_MSG_CHECKING([for x32 environment])
58 +AC_LINK_IFELSE(
59 +   [AC_LANG_SOURCE(
60 +      [extern void exit(int);
61 +      int main() {
62 +      #if defined(__ILP32__) && defined(__x86_64__)
63 +          exit(0);}
64 +      #else
65 +          BORK!
66 +      #endif
67 +      ]
68 +   )]
69 +  ,[CPU_BITS="-mx32"]
70 +   [CPU_BIT_STR="32"]
71 +   [AC_MSG_RESULT([yes])]
72 +   ,
73 +)
74 +
75  if test "x${CPU_BITS}" = x-m64 ; then
76    JTR_SET_64_INCLUDES
77  fi
78  
79 +if test "x${CPU_BITS}" = x-mx32 ; then
80 +       JTR_SET_X32_INCLUDES
81 +fi
82 +
83  dnl Checks for programs.
84  AC_PROG_LN_S
85  AC_PROG_GREP
86 --- john-1.8.0-jumbo-1/src/aes/aesni/iaes_asm_interface.h~      2014-05-16 15:40:40.000000000 +0200
87 +++ john-1.8.0-jumbo-1/src/aes/aesni/iaes_asm_interface.h       2015-08-09 21:00:28.357476188 +0200
88 @@ -56,7 +56,7 @@
89  #endif
90  
91  #ifdef __linux__
92 -#ifndef __LP64__
93 +#if !(defined(__LP64__) || defined(__ILP32__))
94  #define iEncExpandKey256 _iEncExpandKey256
95  #define iEncExpandKey192 _iEncExpandKey192
96  #define iEncExpandKey128 _iEncExpandKey128
This page took 0.066181 seconds and 2 git commands to generate.