Revision 25be210f configure

b/configure
2073 2073

  
2074 2074
for target in $target_list; do
2075 2075
target_dir="$target"
2076
config_mak=$target_dir/config.mak
2077
config_h=$target_dir/config.h
2076
config_target_mak=$target_dir/config-target.mak
2077
config_target_h=$target_dir/config-target.h
2078 2078
target_arch2=`echo $target | cut -d '-' -f 1`
2079 2079
target_bigendian="no"
2080 2080
case "$target_arch2" in
......
2109 2109
    ;;
2110 2110
esac
2111 2111

  
2112
#echo "Creating $config_mak, $config_h and $target_dir/Makefile"
2112
#echo "Creating $config_target_mak, $config_target_h and $target_dir/Makefile"
2113 2113

  
2114
test -f $config_h && mv $config_h ${config_h}~
2114
test -f $config_target_h && mv $config_target_h ${config_target_h}~
2115 2115

  
2116 2116
mkdir -p $target_dir
2117 2117
mkdir -p $target_dir/fpu
......
2128 2128
ln -s $source_path/Makefile.target $target_dir/Makefile
2129 2129

  
2130 2130

  
2131
echo "# Automatically generated by configure - do not modify" > $config_mak
2131
echo "# Automatically generated by configure - do not modify" > $config_target_mak
2132 2132

  
2133 2133
bflt="no"
2134 2134
elfload32="no"
2135 2135
target_nptl="no"
2136 2136
interp_prefix1=`echo "$interp_prefix" | sed "s/%M/$target_arch2/g"`
2137
echo "CONFIG_QEMU_PREFIX=\"$interp_prefix1\"" >> $config_mak
2137
echo "CONFIG_QEMU_PREFIX=\"$interp_prefix1\"" >> $config_target_mak
2138 2138
gdb_xml_files=""
2139 2139

  
2140 2140
TARGET_ARCH="$target_arch2"
......
2175 2175
  ;;
2176 2176
  mips|mipsel)
2177 2177
    TARGET_ARCH=mips
2178
    echo "TARGET_ABI_MIPSO32=y" >> $config_mak
2178
    echo "TARGET_ABI_MIPSO32=y" >> $config_target_mak
2179 2179
    target_nptl="yes"
2180 2180
    target_phys_bits=64
2181 2181
  ;;
2182 2182
  mipsn32|mipsn32el)
2183 2183
    TARGET_ARCH=mipsn32
2184 2184
    TARGET_BASE_ARCH=mips
2185
    echo "TARGET_ABI_MIPSN32=y" >> $config_mak
2185
    echo "TARGET_ABI_MIPSN32=y" >> $config_target_mak
2186 2186
    target_phys_bits=64
2187 2187
  ;;
2188 2188
  mips64|mips64el)
2189 2189
    TARGET_ARCH=mips64
2190 2190
    TARGET_BASE_ARCH=mips
2191
    echo "TARGET_ABI_MIPSN64=y" >> $config_mak
2191
    echo "TARGET_ABI_MIPSN64=y" >> $config_target_mak
2192 2192
    target_phys_bits=64
2193 2193
  ;;
2194 2194
  ppc)
......
2213 2213
    TARGET_ARCH=ppc64
2214 2214
    TARGET_BASE_ARCH=ppc
2215 2215
    TARGET_ABI_DIR=ppc
2216
    echo "TARGET_ABI32=y" >> $config_mak
2216
    echo "TARGET_ABI32=y" >> $config_target_mak
2217 2217
    gdb_xml_files="power64-core.xml power-fpu.xml power-altivec.xml power-spe.xml"
2218 2218
    target_phys_bits=64
2219 2219
  ;;
......
2235 2235
    TARGET_ARCH=sparc64
2236 2236
    TARGET_BASE_ARCH=sparc
2237 2237
    TARGET_ABI_DIR=sparc
2238
    echo "TARGET_ABI32=y" >> $config_mak
2238
    echo "TARGET_ABI32=y" >> $config_target_mak
2239 2239
    target_phys_bits=64
2240 2240
  ;;
2241 2241
  *)
......
2243 2243
    exit 1
2244 2244
  ;;
2245 2245
esac
2246
echo "TARGET_ARCH=$TARGET_ARCH" >> $config_mak
2246
echo "TARGET_ARCH=$TARGET_ARCH" >> $config_target_mak
2247 2247
target_arch_name="`echo $TARGET_ARCH | tr '[:lower:]' '[:upper:]'`"
2248
echo "TARGET_$target_arch_name=y" >> $config_mak
2249
echo "TARGET_ARCH2=$target_arch2" >> $config_mak
2248
echo "TARGET_$target_arch_name=y" >> $config_target_mak
2249
echo "TARGET_ARCH2=$target_arch2" >> $config_target_mak
2250 2250
# TARGET_BASE_ARCH needs to be defined after TARGET_ARCH
2251 2251
if [ "$TARGET_BASE_ARCH" = "" ]; then
2252 2252
  TARGET_BASE_ARCH=$TARGET_ARCH
2253 2253
fi
2254
echo "TARGET_BASE_ARCH=$TARGET_BASE_ARCH" >> $config_mak
2254
echo "TARGET_BASE_ARCH=$TARGET_BASE_ARCH" >> $config_target_mak
2255 2255
if [ "$TARGET_ABI_DIR" = "" ]; then
2256 2256
  TARGET_ABI_DIR=$TARGET_ARCH
2257 2257
fi
2258
echo "TARGET_ABI_DIR=$TARGET_ABI_DIR" >> $config_mak
2258
echo "TARGET_ABI_DIR=$TARGET_ABI_DIR" >> $config_target_mak
2259 2259
if [ $target_phys_bits -lt $hostlongbits ] ; then
2260 2260
  target_phys_bits=$hostlongbits
2261 2261
fi
2262 2262
case "$target_arch2" in
2263 2263
  i386|x86_64)
2264 2264
    if test "$xen" = "yes" -a "$target_softmmu" = "yes" ; then
2265
      echo "CONFIG_XEN=y" >> $config_mak
2265
      echo "CONFIG_XEN=y" >> $config_target_mak
2266 2266
    fi
2267 2267
esac
2268 2268
case "$target_arch2" in
......
2274 2274
      \( "$target_arch2" = "ppc64"  -a "$cpu" = "ppc" \) -o \
2275 2275
      \( "$target_arch2" = "x86_64" -a "$cpu" = "i386"   \) -o \
2276 2276
      \( "$target_arch2" = "i386"   -a "$cpu" = "x86_64" \) \) ; then
2277
      echo "CONFIG_KVM=y" >> $config_mak
2278
      echo "KVM_CFLAGS=$kvm_cflags" >> $config_mak
2277
      echo "CONFIG_KVM=y" >> $config_target_mak
2278
      echo "KVM_CFLAGS=$kvm_cflags" >> $config_target_mak
2279 2279
    fi
2280 2280
esac
2281
echo "TARGET_PHYS_ADDR_BITS=$target_phys_bits" >> $config_mak
2281
echo "TARGET_PHYS_ADDR_BITS=$target_phys_bits" >> $config_target_mak
2282 2282
if test "$target_bigendian" = "yes" ; then
2283
  echo "TARGET_WORDS_BIGENDIAN=y" >> $config_mak
2283
  echo "TARGET_WORDS_BIGENDIAN=y" >> $config_target_mak
2284 2284
fi
2285 2285
if test "$target_softmmu" = "yes" ; then
2286
  echo "CONFIG_SOFTMMU=y" >> $config_mak
2287
  echo "LIBS+=$libs_softmmu" >> $config_mak
2288
  echo "HWLIB=../libhw$target_phys_bits/libqemuhw$target_phys_bits.a" >> $config_mak
2286
  echo "CONFIG_SOFTMMU=y" >> $config_target_mak
2287
  echo "LIBS+=$libs_softmmu" >> $config_target_mak
2288
  echo "HWLIB=../libhw$target_phys_bits/libqemuhw$target_phys_bits.a" >> $config_target_mak
2289 2289
  echo "subdir-$target: subdir-libhw$target_phys_bits" >> $config_host_mak
2290 2290
fi
2291 2291
if test "$target_user_only" = "yes" ; then
2292
  echo "CONFIG_USER_ONLY=y" >> $config_mak
2292
  echo "CONFIG_USER_ONLY=y" >> $config_target_mak
2293 2293
fi
2294 2294
if test "$target_linux_user" = "yes" ; then
2295
  echo "CONFIG_LINUX_USER=y" >> $config_mak
2295
  echo "CONFIG_LINUX_USER=y" >> $config_target_mak
2296 2296
fi
2297 2297
if test "$target_darwin_user" = "yes" ; then
2298
  echo "CONFIG_DARWIN_USER=y" >> $config_mak
2298
  echo "CONFIG_DARWIN_USER=y" >> $config_target_mak
2299 2299
fi
2300 2300
list=""
2301 2301
if test ! -z "$gdb_xml_files" ; then
......
2303 2303
    list="$list $source_path/gdb-xml/$x"
2304 2304
  done
2305 2305
fi
2306
echo "TARGET_XML_FILES=$list" >> $config_mak
2306
echo "TARGET_XML_FILES=$list" >> $config_target_mak
2307 2307

  
2308 2308
case "$target_arch2" in
2309 2309
  arm|armeb|m68k|microblaze|mips|mipsel|mipsn32|mipsn32el|mips64|mips64el|ppc|ppc64|ppc64abi32|ppcemb|sparc|sparc64|sparc32plus)
2310
    echo "CONFIG_SOFTFLOAT=y" >> $config_mak
2310
    echo "CONFIG_SOFTFLOAT=y" >> $config_target_mak
2311 2311
    ;;
2312 2312
  *)
2313
    echo "CONFIG_NOSOFTFLOAT=y" >> $config_mak
2313
    echo "CONFIG_NOSOFTFLOAT=y" >> $config_target_mak
2314 2314
    ;;
2315 2315
esac
2316 2316

  
2317 2317
if test "$target_user_only" = "yes" -a "$bflt" = "yes"; then
2318
  echo "TARGET_HAS_BFLT=y" >> $config_mak
2318
  echo "TARGET_HAS_BFLT=y" >> $config_target_mak
2319 2319
fi
2320 2320
if test "$target_user_only" = "yes" \
2321 2321
        -a "$nptl" = "yes" -a "$target_nptl" = "yes"; then
2322
  echo "CONFIG_USE_NPTL=y" >> $config_mak
2322
  echo "CONFIG_USE_NPTL=y" >> $config_target_mak
2323 2323
fi
2324 2324
# 32 bit ELF loader in addition to native 64 bit loader?
2325 2325
if test "$target_user_only" = "yes" -a "$elfload32" = "yes"; then
2326
  echo "TARGET_HAS_ELFLOAD32=y" >> $config_mak
2326
  echo "TARGET_HAS_ELFLOAD32=y" >> $config_target_mak
2327 2327
fi
2328 2328
if test "$target_user_only" = "yes" -a "$guest_base" = "yes"; then
2329
  echo "CONFIG_USE_GUEST_BASE=y" >> $config_mak
2329
  echo "CONFIG_USE_GUEST_BASE=y" >> $config_target_mak
2330 2330
fi
2331 2331
if test "$target_bsd_user" = "yes" ; then
2332
  echo "CONFIG_BSD_USER=y" >> $config_mak
2332
  echo "CONFIG_BSD_USER=y" >> $config_target_mak
2333 2333
fi
2334 2334

  
2335 2335
# generate QEMU_CFLAGS/LDFLAGS for targets
......
2348 2348
for i in $ARCH $TARGET_BASE_ARCH ; do
2349 2349
  case "$i" in
2350 2350
  alpha)
2351
    echo "CONFIG_ALPHA_DIS=y"  >> $config_mak
2351
    echo "CONFIG_ALPHA_DIS=y"  >> $config_target_mak
2352 2352
  ;;
2353 2353
  arm)
2354
    echo "CONFIG_ARM_DIS=y"  >> $config_mak
2354
    echo "CONFIG_ARM_DIS=y"  >> $config_target_mak
2355 2355
  ;;
2356 2356
  cris)
2357
    echo "CONFIG_CRIS_DIS=y"  >> $config_mak
2357
    echo "CONFIG_CRIS_DIS=y"  >> $config_target_mak
2358 2358
  ;;
2359 2359
  hppa)
2360
    echo "CONFIG_HPPA_DIS=y"  >> $config_mak
2360
    echo "CONFIG_HPPA_DIS=y"  >> $config_target_mak
2361 2361
  ;;
2362 2362
  i386|x86_64)
2363
    echo "CONFIG_I386_DIS=y"  >> $config_mak
2363
    echo "CONFIG_I386_DIS=y"  >> $config_target_mak
2364 2364
  ;;
2365 2365
  m68k)
2366
    echo "CONFIG_M68K_DIS=y"  >> $config_mak
2366
    echo "CONFIG_M68K_DIS=y"  >> $config_target_mak
2367 2367
  ;;
2368 2368
  microblaze)
2369
    echo "CONFIG_MICROBLAZE_DIS=y"  >> $config_mak
2369
    echo "CONFIG_MICROBLAZE_DIS=y"  >> $config_target_mak
2370 2370
  ;;
2371 2371
  mips*)
2372
    echo "CONFIG_MIPS_DIS=y"  >> $config_mak
2372
    echo "CONFIG_MIPS_DIS=y"  >> $config_target_mak
2373 2373
  ;;
2374 2374
  ppc*)
2375
    echo "CONFIG_PPC_DIS=y"  >> $config_mak
2375
    echo "CONFIG_PPC_DIS=y"  >> $config_target_mak
2376 2376
  ;;
2377 2377
  s390)
2378
    echo "CONFIG_S390_DIS=y"  >> $config_mak
2378
    echo "CONFIG_S390_DIS=y"  >> $config_target_mak
2379 2379
  ;;
2380 2380
  sh4)
2381
    echo "CONFIG_SH4_DIS=y"  >> $config_mak
2381
    echo "CONFIG_SH4_DIS=y"  >> $config_target_mak
2382 2382
  ;;
2383 2383
  sparc*)
2384
    echo "CONFIG_SPARC_DIS=y"  >> $config_mak
2384
    echo "CONFIG_SPARC_DIS=y"  >> $config_target_mak
2385 2385
  ;;
2386 2386
  esac
2387 2387
done
......
2416 2416
if test "$target_softmmu" = "yes" -a \( \
2417 2417
        "$TARGET_ARCH" = "microblaze" -o \
2418 2418
        "$TARGET_ARCH" = "cris" \) ; then
2419
  echo "CONFIG_NEED_MMU=y" >> $config_mak
2419
  echo "CONFIG_NEED_MMU=y" >> $config_target_mak
2420 2420
fi
2421 2421

  
2422 2422
if test "$gprof" = "yes" ; then
2423
  echo "TARGET_GPROF=yes" >> $config_mak
2423
  echo "TARGET_GPROF=yes" >> $config_target_mak
2424 2424
  if test "$target_linux_user" = "yes" ; then
2425 2425
    cflags="-p $cflags"
2426 2426
    ldflags="-p $ldflags"
2427 2427
  fi
2428 2428
  if test "$target_softmmu" = "yes" ; then
2429 2429
    ldflags="-p $ldflags"
2430
    echo "GPROF_CFLAGS=-p" >> $config_mak
2430
    echo "GPROF_CFLAGS=-p" >> $config_target_mak
2431 2431
  fi
2432 2432
fi
2433 2433

  
......
2454 2454
  esac
2455 2455
fi
2456 2456

  
2457
echo "LDFLAGS+=$ldflags" >> $config_mak
2458
echo "QEMU_CFLAGS+=$cflags" >> $config_mak
2457
echo "LDFLAGS+=$ldflags" >> $config_target_mak
2458
echo "QEMU_CFLAGS+=$cflags" >> $config_target_mak
2459 2459

  
2460
echo "#include \"../config-host.h\"" > $config_h
2460
echo "#include \"../config-host.h\"" > $config_target_h
2461 2461

  
2462
/bin/sh $source_path/create_config < $config_mak >> $config_h
2462
/bin/sh $source_path/create_config < $config_target_mak >> $config_target_h
2463 2463

  
2464
if test -f ${config_h}~ ; then
2465
  if cmp -s $config_h ${config_h}~ ; then
2466
    mv ${config_h}~ $config_h
2464
if test -f ${config_target_h}~ ; then
2465
  if cmp -s $config_target_h ${config_target_h}~ ; then
2466
    mv ${config_target_h}~ $config_target_h
2467 2467
  else
2468
    rm ${config_h}~
2468
    rm ${config_target_h}~
2469 2469
  fi
2470 2470
fi
2471 2471

  

Also available in: Unified diff